Answer the question
In order to leave comments, you need to log in
Is it possible to change the controller?
Requests are coming
Route::get('/{ver}/d/{guid}',['uses'=>'[email protected]']);
Answer the question
In order to leave comments, you need to log in
The names of methods, classes, namespaces, functions, and so on must always begin with a letter.
It is also customary in Lara to name methods in the camelCase format.
Route::get('1.0/d/{guid}', 'Files\v1b0\[email protected]');
Route::get('2.0/d/{guid}', 'Files\v2b0\[email protected]');
Route::get('2.1/d/{guid}', 'Files\v2b1\[email protected]');
Something like this, it is not necessary that it will work, but the direction is if I understand you correctly
Route::get('/{ver}/d/{guid}', function($ver, $guid) {
$class = '\\App\\Http\\Controllers\\Files\\'.$ver.'\\Files';
$controller = new $class();
return $controller->index($guid);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question