Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

Join Query in Laravel 5

mysql laravel
Join Query in Laravel 5

The query builder may also be used to write join statements. To perform a basic "inner join", you may use the join method on a query builder instance. The first argument passed to the join method is the name of the table you need to join to, while the remaining arguments specify the column constraints for the join. Of course, as you can see, you can join to multiple tables in a single query.

$data['get_cartlist'] = DB::table('cart')
    ->join('cart_products', 'cart.crt_id', '=', 'cart_products.cart_id')
    ->join('diamond_master', 'cart_products.loat_id', '=', 'diamond_master.Loat_NO')
    ->select('diamond_master.*','cart_products.crt_p_id', 'cart_products.loat_id',
'cart_products.add_date',' as diamondid')
		->orderBy('cart_products.add_date', 'desc')
return view('front.checkout',$data);

Insert query in Laravel 5 using Model

How to make Condition based query in Laravel 5 using Model

Insert Query in Laravel 5

Update Query in Laravel 5

Delete Query in Laravel 5


Html code work in comment box

Related Post