Files
filament/config/filament.php
T
2021-04-11 23:34:33 +01:00

209 lines
6.2 KiB
PHP

<?php
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Http\Middleware\EncryptCookies;
use Filament\Http\Middleware\RedirectIfAuthenticated;
use Filament\Http\Middleware\VerifyCsrfToken;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
return [
/*
|--------------------------------------------------------------------------
| Filament Path
|--------------------------------------------------------------------------
|
| The default is `admin` but you can change it to whatever works best and
| doesn't conflict with the routing in your application.
|
*/
'path' => env('FILAMENT_PATH', 'admin'),
/*
|--------------------------------------------------------------------------
| Filament Domain
|--------------------------------------------------------------------------
|
| You may change the domain where Filament should be active. If the domain
| is empty, all domains will be valid.
|
*/
'domain' => env('FILAMENT_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| Auth
|--------------------------------------------------------------------------
|
| This is the configuration that Filament will use to handle authentication
| into the admin panel.
|
*/
'auth' => [
'guard' => env('FILAMENT_AUTH_GUARD', 'filament'),
'logout_redirect_route' => 'filament.auth.login',
],
/*
|--------------------------------------------------------------------------
| Pages
|--------------------------------------------------------------------------
|
| This is the namespace and directory that Filament will automatically
| register pages from.
|
*/
'pages' => [
'namespace' => 'App\\Filament\\Pages',
'path' => app_path('Filament/Pages'),
],
/*
|--------------------------------------------------------------------------
| Resources
|--------------------------------------------------------------------------
|
| This is the namespace and directory that Filament will automatically
| register resources from.
|
*/
'resources' => [
'namespace' => 'App\\Filament\\Resources',
'path' => app_path('Filament/Resources'),
],
/*
|--------------------------------------------------------------------------
| Roles
|--------------------------------------------------------------------------
|
| This is the namespace and directory that Filament will automatically
| register roles from.
|
*/
'roles' => [
'namespace' => 'App\\Filament\\Roles',
'path' => app_path('Filament/Roles'),
],
/*
|--------------------------------------------------------------------------
| Widgets
|--------------------------------------------------------------------------
|
| This is the namespace and directory that Filament will automatically
| register widgets from.
|
*/
'widgets' => [
'namespace' => 'App\\Filament\\Widgets',
'path' => app_path('Filament/Widgets'),
'default' => [
'account' => true,
'info' => true,
],
],
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| This is the storage disk Filament will use to put media. You may use any
| of the disks defined in the `config/filesystems.php`.
|
*/
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'),
/*
|--------------------------------------------------------------------------
| User Resource
|--------------------------------------------------------------------------
|
| This is the user resource class that Filament will use to generate tables
| and forms to manage users.
|
*/
'user_resource' => \Filament\Resources\UserResource::class,
/*
|--------------------------------------------------------------------------
| Avatar Provider
|--------------------------------------------------------------------------
|
| This is the service that will be used to retrieve default avatars if one
| has not been uploaded.
|
*/
'avatar_provider' => \Filament\AvatarProviders\GravatarProvider::class,
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
|
| You may customise the middleware stack that Filament uses to handle
| requests.
|
*/
'middleware' => [
'auth' => [
Authenticate::class,
],
'base' => [
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DispatchServingFilamentEvent::class,
],
'guest' => [
RedirectIfAuthenticated::class,
],
],
/*
|--------------------------------------------------------------------------
| Cache
|--------------------------------------------------------------------------
|
| This is the cache disk Filament will use, you may use any of the disks
| defined in the `config/filesystems.php`.
|
*/
'cache_disk' => env('FILAMENT_CACHE_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Cache Path Prefix
|--------------------------------------------------------------------------
|
| This is the cache path prefix used by Filament. It is relative to the
| disk defined above.
|
*/
'cache_path_prefix' => 'filament/cache',
];