Tag : Join


Laravel 5 - inner join with multiple conditions example using Query Builder

In this post you can learn how to add multiple condition in join query of Laravel Eloquent. if you use data relationship then you don't need to use but if you need to get manually join with two or more condition then it can help. in this example i also add how to add simple inner join in laravel and how to add multiple conditions with inner join i mean using "on" method. You can see bellow example: <strong>Example:</strong> <pre class="prettyprint lang-php"> $user = User::select("users.*","items.id as itemId","jobs.id as jobId") ->join("items","items.user_id","=","users.id") .....

By Hardik Savani | April 30, 2016 | | 3719 Viewer | Category : Laravel
READ MORE

Laravel 5 Join with subquery in Query Builder Example

In this post i want to show you how to use subquery with join in laravel query builder. Whenever you need to use subquery in your laravel project you can use following example and learn hot to use subquery. In bellow example you can see we add subquery using DB::raw(), DB::raw() throught we can select our subtable and after in second argument i added compare your field. That way you can easily fire subquery with laravel 5.2 query builder. <strong>Example:</strong> <pre class="language-sql"> $data = DB::table("items") ->select("items.*","items_count.price_group","items_count.quantity_group") .....

By Hardik Savani | March 2, 2016 | | 7386 Viewer | Category : PHP Laravel
READ MORE

    Laravel 5.2 API using JWT authentication tutorial from scratch example

    Laravel 5.2 API using JWT authentication tutorial from scratch example

    Open Post

    Laravel 5 amazon s3 file upload tutorial - Part 1

    Laravel 5 amazon s3 file upload tutorial - Part 1

    Open Post

    Bootstrap - maxlength validation with count remaining character example

    Bootstrap - maxlength validation with count remaining character example

    Open Post

    Jquery Select2 - Select box with search example code

    Jquery Select2 - Select box with search example code

    Open Post

    How to install laravel framework on windows xampp server from scratch?

    How to install laravel framework on windows xampp server from scratch?

    Open Post

    Solved - opencart this merchant is not enabled for auth/settle

    Solved - opencart this merchant is not enabled for auth/settle

    Open Post