Laravel Classroom image

Anil  Bist / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14|
Lessons:-Fluent Query Builder

10.12 Delete
To delete a row (please, not the shoes, they are innocent!) we can use the delete() method with
a where() clause, or simply pass it an id directly to delete a single row. Let’s see these methods
in action.
1 <?php
2
3 DB::table('not_shoes')->where('texture', '=', 'fuzzy')->delete();
Simple. The fuzzy things are now gone!
1 <?php
2
3 DB::table('shoes')->delete($id);NO! Not the hot pink skate shoes. You have obviously learned too much, please keep the
responsibility and power thing in mind. We don’t want any more shoe massacres.
In the next chapter, we will be moving on from sho… Fluent, and taking a look at Eloquent.
Eloquent will allow us to treat our database rows as objects, and provides an elegant.. or eloquent
solution to handling relationships.
I would like to thank Max Schwanekamp for purchasing the book, and also Douglas Grubba who
had the following to say:
Keep up the great work Dayle! A wonderful resource. Thank you to the @laravel
team. @taylorotwell you are really changing the php world.
Thanks Doug! I’m sure Taylor will also be pleased to hear that he is changing the PHP world,
one method at a time!

 

 

 
 
 
image
Anil  Bist

Skills    Laravel

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore

 

  Students (0)