Problem with Auth Middleware

Posted 9 months ago by Tetravalence

Hi! The following snippet of code taken from a tutorial by Auth0.com

Route::get('/got', [
  'middleware' => ['auth'],
  'uses' => function () {
   echo "You are allowed to view this page!";
}]);

What is that supposed to do? When I log out and I try to access that route, Auth middleware does a redirect back to the/login route, same thing happens when I log in, Auth Middleware does a redirect back to the /home route and the echo message is not displayed. Why?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.