The database query builder provides a convenient, fluent interface to creating and running database queries in Laravel apps.
Given the following code: DB::table('users')->get(); I want to get the raw SQL query string that …
php sql laravel laravel-4 laravel-query-builderI'm using the Laravel Eloquent query builder and I have a query where I want a WHERE clause on multiple …
php laravel eloquent laravel-query-builderHow do I say WHERE (a = 1 OR b =1 ) AND (c = 1 OR d = 1) For more complicated queries am I supposed to …
php laravel eloquent laravel-query-builderWhat's the shorthand for inserting a new record or updating if it exists? <?php $shopOwner = ShopMeta::where('shopId', '=…
php laravel eloquent laravel-query-builderI have two tables, User and Post. One User can have many posts and one post belongs to only one …
php laravel orm eloquent laravel-query-builderI want to sort multiple columns in Laravel 4 by using the method orderBy() in Laravel Eloquent. The query will be …
php laravel laravel-4 eloquent laravel-query-builderHow can I retrieve the raw executed SQL query in Laravel 3/4 using Laravel Query Builder or Eloquent ORM? For example, …
php laravel orm eloquent laravel-query-builderI'm trying to add a condition using a JOIN query with Laravel Query Builder. <?php $results = DB::select(' …
laravel laravel-4 laravel-query-builderHow to change date-format in laravel from "2016-03-12" to "12-Mar-2016" $results = DB::table('customers as cust') ->where(…
php laravel laravel-5 laravel-query-builder$book = array('book1','book2'); $book array elements numbers are variable. it might have 2 element or 20 elements I need …
php laravel-5 laravel-query-builder