am having a hard issue... I create a resource... buy no idea how to set up a service slug check please
Route::resource('/user/{user}/services', 'ServiceController' , [
'names' => [
'index' => 'services',
'create' => 'newService',
'store' => 'storeService',
'edit' => 'editService',
'update' => 'updateService'
]
])
after doing this way I got to change the code to this new one... but I like the first one but don't have any idea how to do it right
check the code I am using...
Route::get('/user/{user:name}/services', 'ServiceController@index')->name('services');
Route::get('/user/{user:name}/services/create', 'ServiceController@create')->name('newService');
Route::post('/user/{user:name}/services', 'ServiceController@store')->name('storeService');
Route::get('/user/{user:name}/services/{service:slug}/edit', 'ServiceController@edit')->name('editService');
Route::post('/user/{user:name}/services/{service:slug}', 'ServiceController@update')->name('updateService');
first call the user name... then call the service by it slug, I want to do the same but in the resource method... som idea how to do it?... thanks