Hello friends, welcome back to my blog. Today in this blog post, I am going to tell you, laravel 8 Login Registration Working Tutorial.
Guys if you are new in laravel the please check below link for Laravel basics information:
Laravel Basics Tutorial for beginners
Friends now I proceed onwards and here is the code snippet for laravel 8 Login Registration Working Tutorial and please use this carefully to avoid the mistakes:
1. Firstly friends, we need to get laravel 8 fresh setup and for that, we need to run below commands into our terminal and you must have composer latest version installed into your xmapp or you can download the composer from this https://getcomposer.org/:
composer create-project --prefer-dist laravel/laravel laravelloginregister //after run above then run below command cd laravelloginregister
2. Now friends we need to run below commands to get laravel 8 auth login registration functionality:
composer require laravel/ui php artisan ui vue --auth npm install npm run dev php artisan serve //check the working on browser
3. Now friends, we need to create new database and add that database name and other phpmyadmin details into our laravel 8 project .env file:
4. Now friends we need to add below code inside your app/Providers/AppServiceProvider.php file and this code will resolve your error which will come on migrate time:
... use Illuminate\Support\Facades\Schema; ... class AppServiceProvider extends ServiceProvider { ... public function boot() { ... Schema::defaultStringLength(191); } }
5. Now friends we need to run below command into your terminal to create database default auth tables like users:
php artisan migrate
Now we are done friends and you can check the login and registration functionality. If you have any kind of query or suggestion or any requirement then feel free to comment below.
Note: Friends, I just tell the basic setup and things, you can change the code according to your requirements. For better understanding must watch video above.
I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.
Jassa
Thanks
Hey, great article it helped me a lot. I tried to skip the part where we add the defaultStringLength in AppServiceProvider.php to see the error but it worked fine, I’m using Laravel 8.13
Could you please explain what the error is and on what versions does this happen?
Thanks again.
Welcome and can you please tell me the error.