L
L
lolrofl012018-07-25 18:50:09
Laravel
lolrofl01, 2018-07-25 18:50:09

Is it possible to add multiple namespaces to a Laravel routes group?

Hey!
There is a code:

Route::group(['prefix' => '/', 'namespace' => 'site'], function() {

Those. all controllers in this group are automatically searched in the site folder. And how to add more namespaces and is it possible? I have a couple of routes in a group whose controllers are in a different folder, say folder. Is there a way to make it look something like this?
Route::group(['prefix' => '/', 'namespace' => 'site|folder'], function() {

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question