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 | | 7575 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 | | 14578 Viewer | Category : PHP Laravel
READ MORE

    How to use Select with MySQL DATE_FORMAT() in Laravel?

    How to use Select with MySQL DATE_FORMAT() in Laravel?

    Open Post

    How to create custom facade in laravel 5.2?

    How to create custom facade in laravel 5.2?

    Open Post

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Open Post

    Laravel Jquery Ajax Pagination Example From Scratch

    Laravel Jquery Ajax Pagination Example From Scratch

    Open Post

    Codeigniter 3 - select2 ajax autocomplete from database example with demo

    Codeigniter 3 - select2 ajax autocomplete from database example with demo

    Open Post

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Open Post