Laravel 6 Tutorial for Beginners #22 - Removing Records

preview_player
Показать описание
Hey gang, in this Laravel tutorial we'll see how to remove records from the database table using our eloquent model.

🐱‍👤🐱‍👤 JOIN THE GANG -
----------------------------------------
🐱‍💻 🐱‍💻 My Udemy Courses:

🐱‍💻 🐱‍💻 Course Links:

🐱‍💻 🐱‍💻 Other Related Free Courses:

🐱‍💻 🐱‍💻 The Net Ninja Community Boards:
Рекомендации по теме
Комментарии
Автор

I've watched this entire series and I'm really liking it. One question: How do you delete multiple records at one time?

SoliasSerene
Автор

Hello Ninja! First of all, thanks for a really good guide on laravel. Can you please also answer to why should we use rdeirects instead of standart view methods when we return from our controllers? I think with view it is much easier, because you can also transfer all the data without any additional methods. Can you tell me if i am wrong pls. Thanks!

vxyrviz
Автор

I did exactly as you, but I'm having an error called "The DELETE method is not supported for this route. Supported methods: GET, HEAD, POST.". I've created the delete route in the web.php file, but still couldn't manage to solve the error.

Bk_Getachew
Автор

laravel 8 users the delete route must look like:
Route::delete('/pizzas/{id}', [PizzaController::class, 'destroy']);

faresgeek-dz
Автор

Laravel tutorial for TRUE BEGINNERS on the whole internet!
🙏🏻🙏🏻

DrStevenHong
Автор

If you find 'The POST method is not supported for this route. Supported methods: GET, HEAD.', do 'php artisan route:cache'

euaruksakul
Автор

When I hit complete order than the browser tries to refresh multiple times (the spinning only about 10% multiple times) like stuck. The data is deleted but no redirect (stuck on the page). Laravel version 8.

kefen_
Автор

i was getting an error --> Undefined constant "method_field" .. deleted @method("DELETE") and added <input type="hidden" name="_method" value="delete"> inside form tag and it works fine

neekolad
Автор

I had to use delete instead of destroy
Route::delete('/pizzas/{id}', [PizzaController::class, 'delete']);

ayocs
Автор

I wonder, how the form submit the request without a submit button, or calling the submit () function

abdulrahimmuhammed
Автор

Hello guys I just want to know what applications/tools/ versions(Xampp, jquery, php, etc) that I need to run and create a laravel project ???

jascondes