Skip to content

Commit

Permalink
install Boring Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Jan 23, 2024
1 parent b2ca567 commit 2308fb1
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 18 deletions.
3 changes: 2 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use LaraZeus\Boredom\Concerns\HasBoringAvatar;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use CanResetPassword, HasApiTokens, HasFactory, HasRoles, Notifiable;
use CanResetPassword, HasApiTokens, HasFactory, HasRoles, Notifiable, HasBoringAvatar;

protected $guarded = [];

Expand Down
61 changes: 45 additions & 16 deletions app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use LaraZeus\Bolt\BoltPlugin;
use LaraZeus\Boredom\BoringAvatarPlugin;
use LaraZeus\Boredom\Enums\Variants;
use LaraZeus\DynamicDashboard\DynamicDashboardPlugin;
use LaraZeus\Sky\SkyPlugin;
use LaraZeus\Wind\WindPlugin;
Expand All @@ -32,37 +34,37 @@ public function panel(Panel $panel): Panel
->default()
->id('admin')
->path('admin')
->homeUrl('/')
->login()
->colors([
'primary' => Color::Emerald,
])
->defaultAvatarProvider(
\LaraZeus\Boredom\BoringAvatarsProvider::class
)
->viteTheme('resources/css/filament/admin/theme.css')
->plugins([
WindPlugin::make()
->windPrefix('contact-us'),

SkyPlugin::make(),

BoltPlugin::make(),

DynamicDashboardPlugin::make()
->defaultLayout('new-page'),

SpatieLaravelTranslatablePlugin::make()
->defaultLocales([config('app.locale')]),

FilamentShieldPlugin::make(),
// Nav
->navigationGroups([
'Site',
'CMS',
'Forms',
'Users',
])
// all plugins
->plugins($this->plugins())
// discoverable
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
//
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
//
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
Expand All @@ -78,4 +80,31 @@ public function panel(Panel $panel): Panel
Authenticate::class,
]);
}

public function plugins(): array
{
return [
WindPlugin::make()
->windPrefix('contact-us')
->navigationGroupLabel('CMS'),

BoringAvatarPlugin::make()
->colors(['0A0310','49007E','FF005B','FF7D10','FFB238']),

SkyPlugin::make()
->navigationGroupLabel('CMS'),

BoltPlugin::make()
->navigationGroupLabel('Forms'),

DynamicDashboardPlugin::make()
->navigationGroupLabel('Site')
->defaultLayout('new-page'),

SpatieLaravelTranslatablePlugin::make()
->defaultLocales([config('app.locale')]),

FilamentShieldPlugin::make(),
];
}
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"guzzlehttp/guzzle": "^7.2",
"lara-zeus/artemis": "^1.0",
"lara-zeus/bolt": "^3.13",
"lara-zeus/boredom": "^1.0",
"lara-zeus/dynamic-dashboard": "^3.0",
"lara-zeus/sky": "^3.4",
"lara-zeus/wind": "^3.2",
Expand Down
83 changes: 82 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2308fb1

Please sign in to comment.