Please share some code. There's very little here to start with. What is the code that you're using, what is happening and what do you expect to happen?
i seen in lara docs that there can be same name in route with get post verb for view also this adapts
Route::get('view/{id}', 'PostController@show')->name('post');
Route::delete('view/{id}', 'PostController@delete')->name('post');
Route::post('view/{id}', 'PostController@save')->name('post');
does laravel takes same route name with diff verbs internally laravel takes care v can give like above
No, you'll need to use unique names for these. This is important when, for example, caching routes:
Route::get('view/{id}', 'PostController@show')->name('post');
Route::delete('view/{id}', 'PostController@delete')->name('post.delete');
Route::post('view/{id}', 'PostController@save')->name('post.create');
However, you can also just name one route and since it references the same url, it doesn't matter:
Route::get('view/{id}', 'PostController@show')->name('post');
Route::delete('view/{id}', 'PostController@delete');
Route::post('view/{id}', 'PostController@save');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community