samedi 7 mai 2016

How to get URI to route in Laravel5

When a user click 'Delete' button, following URI is generated

http://localhost:8888/item?id=32

in my route.php I used

Route::get('item/id={ID}','ItemsController@destroy');

But it doesn't get the input and delete the record. I have created my destroy method properly and when I give URI manually as

http://localhost:8888/item/id=32

it deletes the record.

Why Laravel doesn't capture item?id=32? How to fix this?

Thanks in advance.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/23xmMNv
via IFTTT

Aucun commentaire:

Enregistrer un commentaire