Добавление кнопки логаута
This commit is contained in:
parent
72fb1190f4
commit
8b2c3d44fa
@ -6,5 +6,8 @@ namespace App\Http\Controllers;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,5 +2,9 @@
|
||||
|
||||
@section ('content')
|
||||
<h1>dashboard</h1>
|
||||
@dump(auth()->user())
|
||||
|
||||
<form method="POST" action="{{ route('logout')}}">
|
||||
@csrf
|
||||
<button type="submit">выйти</button>
|
||||
</form>
|
||||
@endsection
|
||||
@ -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']);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user