im using multiple authentication using guards and i stuck with routing of resource Controller
I have two Different Controllers with same name in different namespaces
Route::namespace('Admin')->prefix('admin')->group(function(){
Route::resource('test','HomeController');
});
Route::namespace('Vendor')->prefix('vendor')->group(function(){
Route::resource('test','HomeController');
});
Now i have form for admin
<form action="{{ route('test.store') }}" method="post">
@csrf
<input type="text" name="name">
<input type="submit"/>
</form>
When i submit this form it redirect to the controller of vendor store.
Q. How can i submit form to the HomeController of admin namespace using **name route when i am logged in with admin guard?**
i got the solution we can differentiate both controller by using 'as' with resource route like
after that i can use route name like
route(admin.test.index)
and so ongot the refrence from Laravel named route for resource controller