[Prerequisites] The Lamp environment has been installed normally. Node.js is installed. The database is set up. Can handle artisan command to some extent.
If you haven't installed Node.js, please refer to @ seiba's article. [Citation link] https://qiita.com/seibe/items/36cef7df85fe2cefa3ea
First, check the version of Laravel, enter the following command.
php artisan --version
Check if the version of Laravel is 6 series or 7 series.
For 6 series, install with the following command
composer require laravel/ui:^1.0 --dev
For 7 series, install with the following command
composer require laravel/ui:^2.4
Implement the login function by entering the following command for both 6 and 7 systems.
php artisan ui vue --auth
At this point, the login function is not complete, at this point the REGISTER scene Looking at it ……… The front end part is not implemented.
install npm
npm install
Build npm
npm run dev
Don't forget to use the migration command to create a table to store login information at the end.
php artisan migration
done Start Laravel and click Register on the far right Then, the front end part that was not implemented earlier is implemented. Actually register
If you actually log in successfully, you can move to the page after logging in.
If you look at the table where the passwords are actually stored, you can see that the passwords are encrypted and stored, which can be easily implemented and is a fairly advanced authentication function.
| 1 |Laravel user| [email protected] | NULL |
$2y$10$KPPRJJH0fOYl1JocEdQscu3NNl5BrJU.MpEu4AY1I2ye6F5z18Zsq | NULL | 2021-01-13 12:40:02 | 2021-01-13 12:40:02 |
+----+--------------------+-------------------+-------------------+--------------------------------------------------------------+----------------+---------------------+---------------------+
Reference site [Official version] Laravel official tutorial Japanese translation https://readouble.com/laravel/7.x/ja/authentication.html
Recommended Posts