Issue
Everything in this login is working fine but if a user tries logout route directly
localhost:8000/logout it shows the following error
i want a way so that i can redirect to login if the route is called directly, what could be the vest way for it.
Solution
define a route like this in your routes file. It is because only post method exist for logout.
Route::get('logout', function() {
return redirect()->route('login');
});
Answered By - aimme Answer Checked By - David Marino (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.