-1

when not authtenticated user hits an url in my admin web like www.example.com/course/manage i want to show 500 error page. But now it shows my login for admin page. For other urls not registered in my app, i am able to show 404 page currently by fallback function.. laravel 5.7. pls help me

How do i show 500 error for valid admin url?

i think authenticate.php is what the causing login page. but i dont know how to show 500

1 Answers1

1

That's not the correct HTTP status code for non-authenticated users to be shown after they performed a must authenticate action. The 500 status code server encountered an unexpected condition that prevented it from fulfilling the request. You must return 403 or 401 or the login/register form based on the scenario you have. Anyway, you can check how the Laravel abort function works here more.

Ebi
  • 373
  • 2
  • 12