PHP code example of northwestern-sysdev / northwestern-filament-theme
1. Go to this page and download the library: Download northwestern-sysdev/northwestern-filament-theme library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
northwestern-sysdev / northwestern-filament-theme example snippets
use Northwestern\FilamentTheme\NorthwesternTheme;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
NorthwesternTheme::make(),
// ... other plugins
])
// ... rest of panel config
;
}
NorthwesternTheme::make()
->withoutAssetRegistration()
NorthwesternTheme::make()
->withoutEnvironmentIndicator()
NorthwesternTheme::make()
->environmentIndicator(
visible: fn () => ! app()->isProduction() && auth()->user()?->hasRole('admin'),
)
NorthwesternTheme::make()
->environmentIndicator(label: Str::upper(App::environment()))
NorthwesternTheme::make()
->impersonationBanner(
visible: fn () => session()->has('impersonating'),
)
NorthwesternTheme::make()
->impersonationBanner(
label: fn () => 'Acting as ' . auth()->user()->name,
)
NorthwesternTheme::make()
->impersonationBanner(
leaveUrl: '/my-app/stop-impersonating',
)
NorthwesternTheme::make()
->impersonationBanner(
leaveLabel: 'Return to Admin',
)
NorthwesternTheme::make()
->impersonationBanner(
leaveUrl: '/my-app/stop-impersonating',
leaveMethod: 'DELETE',
)
NorthwesternTheme::make()
->withoutImpersonationBanner()
NorthwesternTheme::make()
->footer()
NorthwesternTheme::make()
->footer(
officeName: 'My Office',
officeAddr: '633 Clark St',
officeCity: 'Evanston, IL 60208',
officePhone: '847-555-1234',
officeEmail: '[email protected] ',
)
NorthwesternTheme::make()
->footer(enabled: false)
NorthwesternTheme::make()
->footer(enabled: fn () => auth()->user()?->isStudent())
bash
php artisan filament:assets
bash
php artisan northwestern-theme:install
bash
php artisan vendor:publish --tag=northwestern-filament-theme-views