Laravel 5 Routing Using Prefix

Hi, I am creating a Laravel 5 project, which should be deployed in a subfolder on the server inside the Wordpress application (I don’t know why clients are clients), then I need a prefix of all routes from the application with a prefix like "/ es", now the problem is connected with routes associated with Auth. In my route definitions, I have the following line:
Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
]);

And my question is, is there a way to prefix these routes without resorting to all the route definitions for the auth controller extracted from the attribute that processes them?

Thanks in advance.

+4
source share
2 answers

, auth password :

Route::controllers([
    'es/auth' => 'Auth\AuthController',
    'es/password' => 'Auth\PasswordController',
]);

, , , .

0

Source: https://habr.com/ru/post/1620910/


All Articles