Level 23
What exactly are you trying to do? There is no need to prefix routes with /. Can you explain a little more?
I have a conflicting route, how can I fix this? I figure out that these 2 routes conflict each other, the inbox.create is working properly, but the jobs.create have a problem, Route not defined. The jobs.create action from route:list is using WorkersTestController instead EmployersTestController. Is there any way to solve this conflicting routes?
Thanks.
// employer.php (this is route)
Route::prefix('/')->middleware('employer')->group(function () {
Route::get ('jobs/create','EmployersTestController@create')->name('jobs.create');
Route::get ('jobs/create','WorkersTestController@create')->name('inbox.create');
You can't have 2 identical endpoints (the url) responding to the same verb (get in this case). Simply change the endpoints so they are unique.
Route::get('jobs/employers/create', 'EmployersTestController@create')->name('jobs.create');
Route::get('jobs/workers/create', 'WorkersTestController@create')->name('inbox.create');
Please or to participate in this conversation.