laravel route 403 forbidden code example
Example 1: laravel telescope 403 forbidden
/**
* Register the Telescope gate.
*
* This gate determines who can access Telescope in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewTelescope', function ($user) {
return in_array($user->email, [
// Your users
'[email protected]',
]);
});
}
Example 2: store route returns 403 forbidden in laravel 6
I found the problem: I had a folder has same name as the route in the public folder.