- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
#11 Make E-com Website in Laravel 6 / 7 | Change Password (II) | Check Current Password with Ajax
In part 11 of Advance E-com series, we will check if current password filled by admin in update password form is correct or not. We will check in Ajax and display message with current password field in Update Password form that we have created in Settings page of admin.
1) Update admin_settings.blade.php file :-
First of all, we will update "Update Password" form by adding action, name, id to form.
2) Create admin_script.js file :-
First of all, we will create admin_script.js file at /public/js/admin_js/ folder. Then we will add Jquery/Ajax in this file to check if current password entered by the admin is correct or not.
3) Update admin_layout.blade.php file :-
Now we will include admin_script.js file in admin_layout.blade.php file.
4) Create Route :-
Now we will create POST route in web.php file for checking current password that we have passed via Ajax URL :-
Route::POST('check-current-pwd','AdminController@chkCurrentPassword');
5) Create chkCurrentPassword function :-
Now we will create chkCurrentPassword function at AdminController in which we will check if current password entered by admin is correct or not. We will return true or false to Ajax to display the message at update password form.
6) Update admin_settings.blade.php file :-
Now in admin_settings file, in Password form, below Current password field, we will add one span tag with id to display message that we have returned from Ajax.
Now we will update our Jquery function. We will check true or false value in Ajax return to display the success or error message in chkPwd ID that we have just created.
7) Update VerifyCsrfToken.php
We will add '/admin/check-current-pwd' route in VerifyCsrfToken.php to exclude it from CSRF verification.
Now see in video, true comes if we give correct password 123456 and false comes if we give incorrect password. And we have added condition in Ajax to display error or success message based on it.
See now in video, message comes based on our current password. So if we give correct password then it shows Current Password is Correct, otherwise Incorrect.
In next video, we will finally update the password and then login with the updated password.
So stay tune for next video.. Thanks for watching :)
Видео #11 Make E-com Website in Laravel 6 / 7 | Change Password (II) | Check Current Password with Ajax канала Stack Developers
1) Update admin_settings.blade.php file :-
First of all, we will update "Update Password" form by adding action, name, id to form.
2) Create admin_script.js file :-
First of all, we will create admin_script.js file at /public/js/admin_js/ folder. Then we will add Jquery/Ajax in this file to check if current password entered by the admin is correct or not.
3) Update admin_layout.blade.php file :-
Now we will include admin_script.js file in admin_layout.blade.php file.
4) Create Route :-
Now we will create POST route in web.php file for checking current password that we have passed via Ajax URL :-
Route::POST('check-current-pwd','AdminController@chkCurrentPassword');
5) Create chkCurrentPassword function :-
Now we will create chkCurrentPassword function at AdminController in which we will check if current password entered by admin is correct or not. We will return true or false to Ajax to display the message at update password form.
6) Update admin_settings.blade.php file :-
Now in admin_settings file, in Password form, below Current password field, we will add one span tag with id to display message that we have returned from Ajax.
Now we will update our Jquery function. We will check true or false value in Ajax return to display the success or error message in chkPwd ID that we have just created.
7) Update VerifyCsrfToken.php
We will add '/admin/check-current-pwd' route in VerifyCsrfToken.php to exclude it from CSRF verification.
Now see in video, true comes if we give correct password 123456 and false comes if we give incorrect password. And we have added condition in Ajax to display error or success message based on it.
See now in video, message comes based on our current password. So if we give correct password then it shows Current Password is Correct, otherwise Incorrect.
In next video, we will finally update the password and then login with the updated password.
So stay tune for next video.. Thanks for watching :)
Видео #11 Make E-com Website in Laravel 6 / 7 | Change Password (II) | Check Current Password with Ajax канала Stack Developers
make ecom website in laravel 7 laravel 7 ecom make ecom in laravel 7 ecommerce in laravel 7 change password laravel 7 make ecom project in laravel 7 make ecommerce in laravel 6 7 check admin current password with ajax laravel laravel 7 ajax laravel 7 admin make admin panel in laravel 7 change admin password in laravel 7 laravel 7 admin password
Комментарии отсутствуют
Информация о видео
17 марта 2020 г. 18:30:14
00:35:44
Другие видео канала





















