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\View\Middleware\ShareErrorsFromSession;
|
||||
use Althinect\FilamentSpatieRolesPermissions\Middleware\SyncSpatiePermissionsWithFilamentTenants;
|
||||
use Filament\View\PanelsRenderHook;
|
||||
|
||||
class AdminPanelProvider extends PanelProvider
|
||||
{
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
|
||||
return $panel
|
||||
->default()
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->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'))
|
||||
->colors([
|
||||
'primary' => Color::Amber,
|
||||
@@ -65,6 +79,19 @@ class AdminPanelProvider extends PanelProvider
|
||||
SyncSpatiePermissionsWithFilamentTenants::class,
|
||||
], isPersistent: true)
|
||||
->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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user