PHP code example of escalated-dev / escalated-filament

1. Go to this page and download the library: Download escalated-dev/escalated-filament 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/ */

    

escalated-dev / escalated-filament example snippets


use Illuminate\Support\Facades\Gate;

Gate::define('escalated-admin', fn ($user) => $user->is_admin);
Gate::define('escalated-agent', fn ($user) => $user->is_agent || $user->is_admin);

use Escalated\Filament\EscalatedFilamentPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(
            EscalatedFilamentPlugin::make()
                ->navigationGroup('Support')
                ->agentGate('escalated-agent')
                ->adminGate('escalated-admin')
        );
}

EscalatedFilamentPlugin::make()
    ->navigationGroup('Support')    // Navigation group label (default: 'Support')
    ->agentGate('escalated-agent')  // Gate for agent access (default: 'escalated-agent')
    ->adminGate('escalated-admin')  // Gate for admin access (default: 'escalated-admin')
bash
php artisan escalated:install
php artisan migrate
bash
php artisan vendor:publish --tag=escalated-filament-views
bash
php artisan vendor:publish --tag=escalated-filament-lang