In this lecture we will discuss laravel database query builder introduction tutorial. query builder is one of the important concept to manage database in laravel.
Query builder vs eloquent orm
query builder is faster than eloquent orm because its contain light light data. it not content much functionalities like eloquent. where as eloquent have more functionality so it slow. one test say 5000 rows save eloquent take 4 second and query builder take only 2.5 second
We will discuss in this series
- insert,insertGetId
- get, where, orWhere, whereBetween, orWhere(function($query))
- where date
- compare two columns(whereColumn)
- first(),find(3),value('email')
- pluck
- select,addselect
- update
- update and insert
- delete,truncate
- Ordering, Grouping, Limit & Offset
- union
- Aggregates
- chunk
- exists
- notexists
Anmol Sharma
I am a software engineer and have experience in web development technologies like php, Laravel, Codeigniter, javascript, jquery, bootstrap and I like to share my deep knowledge by these blogs.
Related tutorial links
- laravel query builder introduction tutorial
- part 1 laravel query insert data
- part 2 laravel all type of where conditions in query builder
- part 3 laravel whereDate, whereYear and whereTime qyery method
- part 4 compare two db columns in laravel query builder
- part 6 laravel pluck method get single column value
- part 7 laravel select and addselect query in query builder
- part 5 laravel first and find queries
- part 8 laravel edit and update method query explaination
- Part 9 laravel query for update or insert data by one method
- part 10 laravel delete vs truncate vs drop method
- part 11 gropupby and orderby query tutorial
- Part 12 laravel union of two queries
- part 13 laravel all aggregate functions with example
- part 14 laravel query builder chunk method
- part 15 laravel exists() and doesntExist() method
- part 16 laravel paginate vs simplePaginate method
- part 17 laravel all join methods