Answer the question
In order to leave comments, you need to log in
Is it possible [without crutches] to generate a controller name in routes dynamically depending on the URI?
For example:
to have something like (this code DOES NOT work))) just not to write a lot of letters:Route::get('/profile', '[email protected]');
Route::get('/profile/{type}', 'Profile'.$type.'[email protected]');
Answer the question
In order to leave comments, you need to log in
In short, there is no tailless solution at all, did I understand correctly?
Ok, a negative result is also a result :)
There will be a limited number of controllers! No more no less. So what's the problem with writing routes for them?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question