29 lines
640 B
PHP
29 lines
640 B
PHP
<?php
|
|
|
|
namespace App\Filament\Pages;
|
|
|
|
use Filament\Pages\Dashboard as BaseDashboard;
|
|
|
|
class Home extends BaseDashboard
|
|
{
|
|
|
|
|
|
public static function shouldRegisterNavigation(): bool
|
|
{
|
|
return false; // Hides it from the sidebar
|
|
}
|
|
|
|
public function mount(): void
|
|
{
|
|
$user = auth()->user();
|
|
|
|
// Redirect based on role or specific logic
|
|
if ($user->role === 'admin') {
|
|
// Your specific resource create path
|
|
redirect('/photo-geo-data');
|
|
} else {
|
|
// Redirect regular users to the list view
|
|
redirect('/photo-geo-data/create');
|
|
}
|
|
}
|
|
}
|