INSERT IGNORE in Laravel Fluent
Laravel’s database query builder provides an easy and fluent interface for creating and running queries. Fluent is very helpful in the cases where you cannot write the query manually to insert an array containing huge amount of elements. When using query builder the drawback is, if you want to change a word in the query it a bit of a job. For example if you want to change INSERT to INSERT IGNORE which is a query used to insert more than forty elements. You have to create a new Grammar which will have the right string. Grammar is a property of DB. You can inject your special grammar into database layer. This is not an unequivocal way to do this.
Comments
0 comments
Please Sign in or Create an account to Post Comments