In laravel i have resource controller :
Route::resource('/student','StudentController');
here is my view listing code :
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<a href="#">Edit</a> |
<a href="">Link</a>
</td>
</tr>
conytroller function i have :
public function destroy($id)
{
echo "ok";
}
My problem is that when i click on anchor button(delete ) it not found the resource route for the delete what i am doing wrong here can anyone please help me elated this. when i click on the delete anchor it call the show function of resource but i want the destroy function to call on click.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire