Как настроить файлы php artisan ui vue --auth - PullRequest
0 голосов
/ 27 апреля 2020

Добрый вечер, я просто хочу спросить, можно ли редактировать маршруты и другие файлы, которые будут сгенерированы при запуске php artisan ui vue --auth

путем настройки? Я имею в виду, как регистрацию можно добавить шаги по регистрации чего-то подобного, я просто хочу спросить, как, когда я смотрю на маршруты / сеть. php нет никаких маршрутов в регистрации, но когда я запускаю php маршрут ремесленника: список есть, извините за вопрос и благодарю заранее, хорошего дня спасибо

1 Ответ

0 голосов
/ 27 апреля 2020

Auth::routes(); - это набор маршрутов. К которым относятся маршруты:

// Authentication Routes
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
$this->post('login', 'Auth\LoginController@login');
$this->post('logout', 'Auth\LoginController@logout')->name('logout');

// Registration Routes
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');

// Password Reset Routes
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm');
$this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
$this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
$this->post('password/reset', 'Auth\ResetPasswordController@reset');

Если вы хотите внести изменения в файлы аутентификации по умолчанию, вы можете. Вы найдете все контроллеры в каталоге Controllers / Auth и блейд-файлы в каталоге resources / Auth.

Если вам все еще сложно. Вместо внесения изменений в Laravel auth! Вы можете просто удалить Auth::routes(); с маршрутов / сети. php и создать свой собственный.

Вот пример:

// Authentication Routes...
$this->get('login', 'LoginController@showLoginForm')->name('login');
$this->post('login', 'LoginController@login');
$this->post('logout', 'LoginController@logout')->name('logout');

// Registration Routes
$this->get('register', 'RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'RegisterController@register');

// Password Reset Routes
$this->get('password/reset', 'ForgotPasswordController@showLinkRequestForm');
$this->post('password/email', 'ForgotPasswordController@sendResetLinkEmail');
$this->get('password/reset/{token}', 'ResetPasswordController@showResetForm');
$this->post('password/reset', 'ResetPasswordController@reset');
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...