When you give a 404 NOT FOUND
, even though I am using it route resource. I don’t go to any page
Route::resource('/' , ClientController::class)
<tbody>
@forelse($clients as $client)
<tr>
<th scope="row">{{$client->id}}</th>
<td>{{$client->email}}</td>
<td>{{$client->password}}</td>
<td>{{$client->city}}</td>
<td><a href="{{route('edit',$client->id)}}" >Update</a></td>
</tr>
<tr>
@empty
<h1>pas de client</h1>
@endforelse
</tbody>
public function edit($id)
{
return $id;
}
2
Answers
Your return needs to go somewhere, try:
or:
Change the above to:
Then, in the blade for edit: