MongoDB Laravel Tutorial #86 | Login/Register (III) | Apply Laravel Validation for Register Form

  Рет қаралды 27

Stack Developers

Stack Developers

Күн бұрын

►Laravel 11 Tutorial (with MongoDB): • Laravel 11 Tutorial (w...
This is Part 86 of the Laravel 11 Tutorial in which we are building the e-commerce website with Laravel as the front end and MongoDB as the back end. We will continue working on the Laravel Login and Register process with default Laravel Web Authentication.
In this part, we will work on user logout and validate the register form with the Laravel Validator class via Ajax.
1) Create Logout Route :-
We will create a logout route in the web.php file to log out the user.
// User Logout
Route::get('user/logout',[UserController::class,'logoutUser']);
2) Create logoutUser function :-
Now create logoutUser function in Front\UserController from where we will log out the user and redirect the user to the index or login/register page again.
3) Update header.blade.php file:-
Now we will update the header.blade.php file to show "My Account" and "Logout" links when the user is logged in and we will use Auth::check to verify whether the user is logged in or not.
Now we will validate the Register form with Validator Class via Ajax
4) Update register.blade.php file :-
We will update the register form and add p tag with the id for Ajax response that we will use later on.
5) Update registerUser function:-
Now we will update registerUser function to validate the user data coming from register form.
6) Update registerForm jQuery function:-
Now we will update the registerForm jQuery function for the Ajax response and print the message if validation failed for any of the field.
In the next part, we will work on sending a welcome email to the user with registration details.
►Click here to subscribe for Laravel & other updates - / stackdevelopers
Popular Stack Developers Series that can help you:-
►Laravel 11 PostgreSQL Tutorial: • Laravel PostgreSQL Tut...
►Laravel 10 Tutorial: • Laravel 10 Tutorial: M...
►Laravel Multi-Vendor E-commerce Series - • Laravel Multi Vendor T...
►React JS Tutorial for Beginners with Laravel - • React JS Tutorial with...
►Laravel Tutorial for Beginners - • Laravel Tutorial for B...
►GIT Tutorial for Beginners - • Git Tutorial for Begin...
►Laravel API Tutorial - • Laravel API Tutorial |...
►Laravel Interview Questions - • Laravel Interview Ques...
►jQuery Tutorial - • jQuery Tutorial
►Laravel Basic E-commerce Series - • Make Admin Panel / E-c...
►Laravel Dating Series - • Make Dating / Social N...
►Join this channel to get the complete source code of all series:
/ @stackdevelopers
Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates - / stackdevelopers2
►Join Facebook Group to resolve your queries - / stackdevelopers
►Follow on Instagram - / stackdevelopers2
►Follow on GitHub - github.com/sta...
#laravel11 #mongodb #mongodbtutorial

Пікірлер
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 14 МЛН
Teaching a Toddler Household Habits: Diaper Disposal & Potty Training #shorts
00:16
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 20 М.
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
Devtamin
Рет қаралды 210 М.
Backend Server setup for Ecommerce site | ExpressJS | JWT Auth | MongoDB | Postman
5:04:36
Laravel Tutorial For Beginners (Simple User CRUD App)
1:16:13
LearnWebCode
Рет қаралды 184 М.
Forms in Next.js Made Easy (Headless API Integration & Validation)
1:40:24
Laravel 11 Tutorial for Beginners - Laravel Crash Course (2024)
1:22:20
The Codeholic
Рет қаралды 174 М.
React + Laravel Full-stack Application | Build and Deploy
3:13:19
The Codeholic
Рет қаралды 360 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 14 МЛН