35 lines
913 B
PHP
Executable File
35 lines
913 B
PHP
Executable File
<?php
|
|
namespace App\Filament\Pages\Mobile;
|
|
|
|
use App\Models\User;
|
|
use App\Services\ProgramAclService;
|
|
use BackedEnum;
|
|
use Filament\Pages\Page;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use UnitEnum;
|
|
|
|
class MobileDashboard extends Page
|
|
{
|
|
protected static ?string $navigationLabel = 'Dashboard Mobile';
|
|
|
|
protected static ?string $title = 'Dashboard Mobile';
|
|
|
|
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-device-phone-mobile';
|
|
|
|
protected static UnitEnum|string|null $navigationGroup = 'Mobile';
|
|
|
|
protected static ?int $navigationSort = 1;
|
|
|
|
protected static ?string $slug = 'mobile/dashboard';
|
|
|
|
protected string $view = 'filament.pages.mobile.dashboard';
|
|
|
|
public static function canAccess(): bool
|
|
{
|
|
$user = Auth::user();
|
|
|
|
return $user instanceof User
|
|
&& app(ProgramAclService::class)->canAccessProgram($user, 'mobile.dashboard');
|
|
}
|
|
}
|