diff --git a/src/app/Http/Controllers/DashboardController.php b/src/app/Http/Controllers/DashboardController.php index 2de2168..3e8d294 100644 --- a/src/app/Http/Controllers/DashboardController.php +++ b/src/app/Http/Controllers/DashboardController.php @@ -6,5 +6,8 @@ namespace App\Http\Controllers; class DashboardController extends Controller { - // + public function index() + { + return view('dashboard'); + } } diff --git a/src/resources/views/dashboard.blade.php b/src/resources/views/dashboard.blade.php index eb13808..221d3c7 100644 --- a/src/resources/views/dashboard.blade.php +++ b/src/resources/views/dashboard.blade.php @@ -2,5 +2,9 @@ @section ('content')

dashboard

-@dump(auth()->user()) + +
+ @csrf + +
@endsection \ No newline at end of file diff --git a/src/routes/web.php b/src/routes/web.php index 7772c2d..85dfa6d 100644 --- a/src/routes/web.php +++ b/src/routes/web.php @@ -2,12 +2,13 @@ declare(strict_types=1); +use App\Http\Controllers\DashboardController; use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('main'); }); -Route::get('dashboard', function () { - return view('dashboard'); -})->middleware(['auth', 'verified']); +Route::middleware(['auth', 'verified'])->group(function () { + Route::get('/dashboard', [DashboardController::class, 'index']); +});