Fixed Filament provider and created admin user
This commit is contained in:
@@ -1,24 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
namespace App\Providers\Filament;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Filament\Http\Middleware\Authenticate;
|
||||
use Filament\Http\Middleware\AuthenticateSession;
|
||||
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||
use Filament\Pages;
|
||||
use Filament\Panel;
|
||||
use Filament\PanelProvider;
|
||||
use Filament\Support\Colors\Color;
|
||||
use Filament\Widgets;
|
||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
class AdminPanelProvider extends PanelProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
//
|
||||
return $panel
|
||||
->default()
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->login()
|
||||
->colors([
|
||||
'primary' => Color::Green, // Neon green accents for crypto feel
|
||||
])
|
||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
||||
->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,
|
||||
StartSession::class,
|
||||
AuthenticateSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
DisableBladeIconComponents::class,
|
||||
DispatchServingFilamentEvent::class,
|
||||
])
|
||||
->authMiddleware([
|
||||
Authenticate::class,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
24
composer.lock
generated
24
composer.lock
generated
@@ -2086,20 +2086,20 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v12.26.4",
|
||||
"version": "v12.27.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "085a367a32ba86fcfa647bfc796098ae6f795b09"
|
||||
"reference": "168844fe531baaa11db00f7902fd0116d46d3bdd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/085a367a32ba86fcfa647bfc796098ae6f795b09",
|
||||
"reference": "085a367a32ba86fcfa647bfc796098ae6f795b09",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/168844fe531baaa11db00f7902fd0116d46d3bdd",
|
||||
"reference": "168844fe531baaa11db00f7902fd0116d46d3bdd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brick/math": "^0.11|^0.12|^0.13",
|
||||
"brick/math": "^0.11|^0.12|^0.13|^0.14",
|
||||
"composer-runtime-api": "^2.2",
|
||||
"doctrine/inflector": "^2.0.5",
|
||||
"dragonmantank/cron-expression": "^3.4",
|
||||
@@ -2299,7 +2299,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2025-08-29T14:15:53+00:00"
|
||||
"time": "2025-09-02T23:59:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
@@ -3842,16 +3842,16 @@
|
||||
},
|
||||
{
|
||||
"name": "openspout/openspout",
|
||||
"version": "v4.31.0",
|
||||
"version": "v4.32.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/openspout/openspout.git",
|
||||
"reference": "90dc2f7ce0b59084b78cd86ca7c5d367759496cd"
|
||||
"reference": "41f045c1f632e1474e15d4c7bc3abcb4a153563d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/openspout/openspout/zipball/90dc2f7ce0b59084b78cd86ca7c5d367759496cd",
|
||||
"reference": "90dc2f7ce0b59084b78cd86ca7c5d367759496cd",
|
||||
"url": "https://api.github.com/repos/openspout/openspout/zipball/41f045c1f632e1474e15d4c7bc3abcb4a153563d",
|
||||
"reference": "41f045c1f632e1474e15d4c7bc3abcb4a153563d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3919,7 +3919,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/openspout/openspout/issues",
|
||||
"source": "https://github.com/openspout/openspout/tree/v4.31.0"
|
||||
"source": "https://github.com/openspout/openspout/tree/v4.32.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3931,7 +3931,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-08-29T05:42:48+00:00"
|
||||
"time": "2025-09-03T16:03:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/sodium_compat",
|
||||
|
||||
Reference in New Issue
Block a user