4 months ago

resource "show" method show me "403 Forbidden"

Posted 4 months ago by laravelhelpme

Hi all, I started to code with Laravel one month ago and I'm using Laravel 5.8. When I create a resource the "show" method (when I try to visit "/domain/1") always show me 403 error:

My routes/web.php:

Route::group(['middleware' => 'auth'], function () {
 Route::resource('domain', 'DomainController');

My controller:

public function show($id)
    return view('', ['domain' => Domain::findOrFail($id)]);

All other resource methods work well (create, update, destroy). Just I got 403 only when I try to visit the link "/domain/{some-id}". Why this can be possible?

Thank you for your help

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