Not sure what's going on here.. Should work fine!
You can however leave the slash from the route
Route::get('offers', 'OffersController@index');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
Suddenly, I got a "403 Forbidden" on one specific route:
Route::get('/offers', 'OffersController@index');
When I try to change /offers to /foobar, it works perfectly.
I didn't change anything in my routes or in my index() function since it was working. I have other routes for '/offers/*, and they work perfectly:
Route::get('/offers/create', 'OffersController@create');
Route::get('/offers/{id}', 'OffersController@show');
Route::post('/offers', 'OffersController@store');
Route::post('offers/{id}/photos', 'OffersController@addPhoto');
I'm using homestead of course.
Anyone has any ideas from where it could come from ? Or at least, how can I debug this ? Is there logs for nginx or something where I could find more information about that 403 error ?
Thanks
I found the problem: I had a folder named "offers" in the public folder.
Please or to participate in this conversation.