Skip to content

Commit b8b4d33

Browse files
committed
🔀 merge admin filament
2 parents 4a67b0c + 1093962 commit b8b4d33

File tree

10 files changed

+1161
-984
lines changed

10 files changed

+1161
-984
lines changed

app/Filament/Pages/Dashboard.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace App\Filament\Pages;
4+
5+
use App\Filament\Widgets\BlogPostsOverview;
6+
use Filament\Pages\Dashboard as BasePage;
7+
8+
class Dashboard extends BasePage
9+
{
10+
protected function getWidgets(): array
11+
{
12+
return [
13+
BlogPostsOverview::class,
14+
];
15+
}
16+
17+
protected function getColumns(): int | array
18+
{
19+
return 5;
20+
}
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace App\Filament\Widgets;
4+
5+
use App\Models\Article;
6+
use Filament\Widgets\Widget;
7+
use Illuminate\Support\Facades\Cache;
8+
9+
class BlogPostsOverview extends Widget
10+
{
11+
protected static string $view = 'filament.widgets.blog-posts-overview';
12+
13+
protected int | string | array $columnSpan = 5;
14+
15+
protected function getViewData(): array
16+
{
17+
$latestArticles = Cache::remember('last-posts', now()->addHour(), fn () => Article::latest()->limit(3)->get());
18+
19+
return [
20+
'latestArticles' => $latestArticles,
21+
];
22+
}
23+
}

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"php": "^8.0",
99
"ext-fileinfo": "*",
1010
"ext-json": "*",
11-
"archtechx/laravel-seo": "^0.4.0",
11+
"archtechx/laravel-seo": "^0.5.1",
1212
"arrilot/laravel-widgets": "^3.13",
1313
"bensampo/laravel-enum": "^6.0",
1414
"blade-ui-kit/blade-heroicons": "^1.3",
1515
"blade-ui-kit/blade-ui-kit": "^0.3",
1616
"cyrildewit/eloquent-viewable": "^6.1",
17-
"doctrine/dbal": "^3.3",
17+
"doctrine/dbal": "^3.5",
1818
"filament/filament": "^2.0",
1919
"filament/forms": "^2.0",
2020
"francescomalatesta/laravel-feature": "^3.0",
@@ -25,12 +25,12 @@
2525
"laravel-notification-channels/telegram": "^2.0",
2626
"laravel-notification-channels/twitter": "^6.0",
2727
"laravel/fortify": "^1.13",
28-
"laravel/framework": "^9.24",
29-
"laravel/sanctum": "^3.0",
28+
"laravel/framework": "^9.47",
29+
"laravel/sanctum": "^3.2",
3030
"laravel/slack-notification-channel": "^2.4",
3131
"laravel/socialite": "^5.2",
3232
"laravel/tinker": "^2.5",
33-
"livewire/livewire": "^2.10",
33+
"livewire/livewire": "^2.11",
3434
"nnjeim/world": "^1.1",
3535
"qcod/laravel-gamify": "^1.0.6",
3636
"ramsey/uuid": "^4.2",
@@ -53,6 +53,7 @@
5353
"yarri/link-finder": "^2.7"
5454
},
5555
"require-dev": {
56+
"barryvdh/laravel-debugbar": "^3.7",
5657
"barryvdh/laravel-ide-helper": "^2.12",
5758
"brianium/paratest": "^6.3",
5859
"fakerphp/faker": "^1.9.1",

0 commit comments

Comments
 (0)