added render hook in pds
This commit is contained in:
@@ -24,16 +24,30 @@ use Illuminate\Routing\Middleware\SubstituteBindings;
|
|||||||
use Illuminate\Session\Middleware\StartSession;
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
use Althinect\FilamentSpatieRolesPermissions\Middleware\SyncSpatiePermissionsWithFilamentTenants;
|
use Althinect\FilamentSpatieRolesPermissions\Middleware\SyncSpatiePermissionsWithFilamentTenants;
|
||||||
|
use Filament\View\PanelsRenderHook;
|
||||||
|
|
||||||
class AdminPanelProvider extends PanelProvider
|
class AdminPanelProvider extends PanelProvider
|
||||||
{
|
{
|
||||||
public function panel(Panel $panel): Panel
|
public function panel(Panel $panel): Panel
|
||||||
{
|
{
|
||||||
|
|
||||||
return $panel
|
return $panel
|
||||||
->default()
|
->default()
|
||||||
->id('admin')
|
->id('admin')
|
||||||
->path('admin')
|
->path('admin')
|
||||||
->login()
|
->login()
|
||||||
|
// ->maxContentWidth(MaxWidth::Small)
|
||||||
|
//->simplePageMaxContentWidth(MaxWidth::Medium)
|
||||||
|
|
||||||
|
// ->login(Login::class, function (Login $login) {
|
||||||
|
// $login->formActions([
|
||||||
|
// ...$login->getFormActions(),
|
||||||
|
// Action::make('forgotPassword')
|
||||||
|
// ->label('Forgot your password?')
|
||||||
|
// ->url(route('password.request')),
|
||||||
|
// ]);
|
||||||
|
// })
|
||||||
|
// ->forgotPassword()
|
||||||
->favicon(asset('/assets/crilogo1.png'))
|
->favicon(asset('/assets/crilogo1.png'))
|
||||||
->colors([
|
->colors([
|
||||||
'primary' => Color::Amber,
|
'primary' => Color::Amber,
|
||||||
@@ -65,6 +79,19 @@ class AdminPanelProvider extends PanelProvider
|
|||||||
SyncSpatiePermissionsWithFilamentTenants::class,
|
SyncSpatiePermissionsWithFilamentTenants::class,
|
||||||
], isPersistent: true)
|
], isPersistent: true)
|
||||||
->databaseNotifications()
|
->databaseNotifications()
|
||||||
|
// ->renderHook(PanelsRenderHook::AUTH_LOGIN_FORM_AFTER, function () {
|
||||||
|
// // Use Filament panel helper for login URL and custom route for forgot password
|
||||||
|
// return '<div class="mt-4 text-center">
|
||||||
|
// <a href="' . route('filament.admin.forgot-password') . '" class="text-primary-600 hover:underline">
|
||||||
|
// Forgot your password?
|
||||||
|
// </a>
|
||||||
|
// </div>';
|
||||||
|
// })
|
||||||
|
//->renderHook('panels::body.end', fn () => view('components.pages.folder-picker-script'))
|
||||||
|
->renderHook(
|
||||||
|
PanelsRenderHook::SIDEBAR_NAV_START,
|
||||||
|
fn () => view('components.navigation-filter')
|
||||||
|
)
|
||||||
->plugin(FilamentSpatieRolesPermissionsPlugin::make());
|
->plugin(FilamentSpatieRolesPermissionsPlugin::make());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user