I have a named route.
I want to pass two parameters to the 'edit' action (for example {id}
and {month}
).
I tried to pass parameters through an array, but still not working.
Route::resource('admin/worktimes', 'WorktimesController')->names([
'index' => 'worktimes',
'show' => 'worktimes.show',
'create' => 'worktimes.create',
'edit' => 'worktimes.edit',
'store' => 'worktimes.store',
'update' => 'worktimes.update'
])
{{ route('admin/worktimes', array($id, $month) }}
The url created is 'http://.../admin/worktimes/4/edit?month=2019-05'. I want to have something like 'http://.../admin/worktimes/4/2019-05/edit'.