netgescon-day0/app/Filament/Pages/Impostazioni/GoogleDashboard.php

33 lines
879 B
PHP

<?php
namespace App\Filament\Pages\Impostazioni;
use App\Models\User;
use BackedEnum;
use Filament\Pages\Page;
use Illuminate\Support\Facades\Auth;
use UnitEnum;
class GoogleDashboard extends Page
{
protected static ?string $navigationLabel = 'Google';
protected static ?string $title = 'Google';
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-cloud';
protected static UnitEnum|string|null $navigationGroup = 'Impostazioni';
protected static ?int $navigationSort = 35;
protected static ?string $slug = 'impostazioni/google';
protected string $view = 'filament.pages.impostazioni.google-dashboard';
public static function canAccess(): bool
{
$user = Auth::user();
return $user instanceof User
&& $user->hasAnyRole(['super-admin', 'admin', 'amministratore', 'collaboratore']);
}
}