[Vuejs]-How to customize php artisan ui vue –auth files

1👍

Auth::routes(); is a collection of routes. Which include 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');

If you want to make changes on default auth files you can. You will find all the controllers in the Controllers/Auth directory and blade files in resources/Auth directory.

If you still find it hard. Instead of making changes in Laravel auth! You can just remove Auth::routes(); from routes/web.php and create your own.

Here is an example:

// 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');

Leave a comment