Group routes for TagController using the resource definition as opposed to defining them separately
MODIFY
routes/web.php
routes/web.php
@@ -23,12 +23,13 @@ Route::group(['middleware' => ['auth']], function () {
Route::resource('/recurrings', 'RecurringController')->only(['index', 'show']);
- Route::get('/tags', 'TagController@index')->name('tags');
- Route::get('/tags/create', 'TagController@create')->name('tags.create');
- Route::post('/tags', 'TagController@store');
- Route::get('/tags/{tag}/edit', 'TagController@edit')->name('tags.edit')->middleware('can:update,tag');
- Route::patch('/tags/{tag}', 'TagController@update')->middleware('can:update,tag');
- Route::delete('/tags/{tag}', 'TagController@destroy')->middleware('can:delete,tag');
+ Route::resource('/tags', 'TagController')->only([
+ 'create',
+ 'store',
+ 'edit',
+ 'update',
+ 'destroy'
+ ]);
Route::get('/settings', 'SettingsController@index')->name('settings');
Route::post('/settings', 'SettingsController@store');

Group routes for TagController using the resource definition as opposed to defining them separately