Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 1 year ago.
0

Hi,

By default, through this below line, Laravel provide all facilities for insert, update and delete.

Route::resource('users', 'UserController');

So no need to write a below line:

Route::get('users/destroy/{year}', 'UserController@destroy')->name('users.destroy.year');

still if you want to write, then try using "delete" instead of "get". For e.g.

Route::delete('users/destroy/{year}', 'UserController@destroy')->name('users.destroy.year');

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

moschel26 moschel26 Joined 21 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.