- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
44. Laravel 13 E-Commerce Project - Admin Edit Coupon
Welcome back to the Laravel E-Commerce Project Tutorial! In this video, we will cover how to Edit the Coupon.
We start by opening the Coupon Controller to create a new `coupon_edit` function, which retrieves the specific coupon using `findOrFail` and passes it to the view. After setting up the GET route, we create the `coupon-edit.blade.php` view file by copying our existing add-coupon form.
You will learn how to update the form to handle updates by changing the action route and applying the `@method('PUT')` directive. We will walk through populating the form inputs with the existing coupon data using the `old()` helper, including a specific technique to format the expiry date using `\Carbon\Carbon::parse` so it displays correctly in the HTML date picker. Finally, we create the update function in the controller, define the PUT route, and add the edit link to our main coupons list.
If you found this video helpful, please subscribe and hit the bell icon to stay updated on the next parts of this series. Thanks for watching, and I’ll see you in the next video!
Topics Discussed in this Video:
1. Creating the `coupon_edit` function in the Coupon Controller using `findOrFail`.
2. Defining the GET route (`/admin/coupon-edit/{coupon_id}`) for the edit page.
3. Creating the `coupon-edit.blade.php` view file using the existing add-coupon form layout.
4. Updating the form action to target the update route and adding the `@method('PUT')` directive.
5. Populating form inputs (Code, Type, Value, Cart Value) with existing database values using the `old()` helper.
6. Formatting the existing expiry date for the HTML date input using `\Carbon\Carbon::parse() format('Y-m-d')`.
7. Creating the update function in the AdminController to save the changes.
8. Setting up the PUT route (`/admin/coupon/update`) in the web routes file.
9. Adding an edit link button to the main admin coupons view.
Your Queries:
1. How to edit and update records in a Laravel 13 admin panel?
2. How to pass existing database values into an HTML form using Laravel Blade?
3. How to use the `@method('PUT')` directive in a Laravel form?
4. How to format dates using Carbon for HTML date inputs in Laravel?
5. How to fetch a single record using `findOrFail` in a Laravel controller?
Template Url :
https://github.com/surfsidemedia/Laravel-13-E-Commerce-Project-Template
Project Source Code:
https://www.surfsidemedia.in/categories/laravel-13-e-commerce-project
FOLLOW SURFSIDE MEDIA:
https://www.facebook.com/SurfsideM/
https://twitter.com/MediaSurfside
https://github.com/surfsidemedia
https://surfsidemedia.tumblr.com/
#laravel #laravel13 #laravel13x
Видео 44. Laravel 13 E-Commerce Project - Admin Edit Coupon канала Surfside Media
We start by opening the Coupon Controller to create a new `coupon_edit` function, which retrieves the specific coupon using `findOrFail` and passes it to the view. After setting up the GET route, we create the `coupon-edit.blade.php` view file by copying our existing add-coupon form.
You will learn how to update the form to handle updates by changing the action route and applying the `@method('PUT')` directive. We will walk through populating the form inputs with the existing coupon data using the `old()` helper, including a specific technique to format the expiry date using `\Carbon\Carbon::parse` so it displays correctly in the HTML date picker. Finally, we create the update function in the controller, define the PUT route, and add the edit link to our main coupons list.
If you found this video helpful, please subscribe and hit the bell icon to stay updated on the next parts of this series. Thanks for watching, and I’ll see you in the next video!
Topics Discussed in this Video:
1. Creating the `coupon_edit` function in the Coupon Controller using `findOrFail`.
2. Defining the GET route (`/admin/coupon-edit/{coupon_id}`) for the edit page.
3. Creating the `coupon-edit.blade.php` view file using the existing add-coupon form layout.
4. Updating the form action to target the update route and adding the `@method('PUT')` directive.
5. Populating form inputs (Code, Type, Value, Cart Value) with existing database values using the `old()` helper.
6. Formatting the existing expiry date for the HTML date input using `\Carbon\Carbon::parse() format('Y-m-d')`.
7. Creating the update function in the AdminController to save the changes.
8. Setting up the PUT route (`/admin/coupon/update`) in the web routes file.
9. Adding an edit link button to the main admin coupons view.
Your Queries:
1. How to edit and update records in a Laravel 13 admin panel?
2. How to pass existing database values into an HTML form using Laravel Blade?
3. How to use the `@method('PUT')` directive in a Laravel form?
4. How to format dates using Carbon for HTML date inputs in Laravel?
5. How to fetch a single record using `findOrFail` in a Laravel controller?
Template Url :
https://github.com/surfsidemedia/Laravel-13-E-Commerce-Project-Template
Project Source Code:
https://www.surfsidemedia.in/categories/laravel-13-e-commerce-project
FOLLOW SURFSIDE MEDIA:
https://www.facebook.com/SurfsideM/
https://twitter.com/MediaSurfside
https://github.com/surfsidemedia
https://surfsidemedia.tumblr.com/
#laravel #laravel13 #laravel13x
Видео 44. Laravel 13 E-Commerce Project - Admin Edit Coupon канала Surfside Media
How to Program laravel (Software) laravel laravel v13 laravel 13 laravel project laravel setting up laravel v13 setting up laravel v13.0 v13.0 laravel 13.0 laravel 13 playlist laravel 13 tutorial laravel tutorial laravel 13.0 tutorial for beginners laravel for beginners laravel tutorial for beginners laravel13 laravel 13 ecommerce tutorial laravel 13 ecommerce ecommerce project in laravel 13 laravel 13 ecommerce project surfside media update coupon
Комментарии отсутствуют
Информация о видео
23 июня 2026 г. 9:00:33
00:08:55
Другие видео канала





















