mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-03-23 02:44:43 -05:00
24 lines
595 B
PHP
24 lines
595 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Web\Admin;
|
|
|
|
use App\Enums\Auth\Permissions;
|
|
use App\Http\Controllers\Controller;
|
|
use Auth;
|
|
use Illuminate\Auth\Access\AuthorizationException;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\View;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function dashboard()
|
|
{
|
|
Artisan::call('permission:cache-reset');
|
|
if(Auth::user()->cant(Permissions::ADMIN_AREA->value))
|
|
throw new AuthorizationException();
|
|
|
|
View::share('title', 'Dashboard');
|
|
return view('admin.dashboard');
|
|
}
|
|
}
|