feat: implement admin login form request
This commit is contained in:
@@ -25,4 +25,23 @@ if (!function_exists('getFileUrl')) {
|
||||
|
||||
return asset('storage/' . $file->path);
|
||||
}
|
||||
|
||||
if (!function_exists('activeAdminSidebar')) {
|
||||
|
||||
function activeAdminSidebar(string|array $routeNames): string
|
||||
{
|
||||
|
||||
$currentRouteName = \Illuminate\Support\Facades\Route::currentRouteName();
|
||||
|
||||
if (is_string($routeNames)) {
|
||||
$routeNames = [$routeNames];
|
||||
}
|
||||
|
||||
if (in_array($currentRouteName, $routeNames)) {
|
||||
return 'active';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user