This is my link
<a href="{{ url($i->id.'/edit') }}">edit</a>
This is my web.php
Route::resource('/', UserController::class);
When i run php artisan route:list
this is the return
GET|HEAD | {}/edit | edit | App\Http\Controllers\UserController@edit | web
CodePudding user response:
It should be
<a href="{{ route('user.edit', $i->id) }}">edit</a>
and
Route::resource('user', UserController::class);
The first argument of the resource should be the name of the route group and not the route.