“улететь в Ларавель” Ответ

Ларавел присоединиться

Inner Join 	: ->join('contacts', 'users.id', '=', 'contacts.user_id')
Left Join 	: ->leftJoin('posts', 'users.id', '=', 'posts.user_id')
Right Join 	: ->rightJoin('posts', 'users.id', '=', 'posts.user_id')
Cross Join 	: ->crossJoin('colors')

Advance Queries : 
----------------- 
 		->join('contacts', function ($join) {
            $join->on('users.id', '=', 'contacts.user_id')
                 ->where('contacts.user_id', '>', 5);
        })
  
Lokesh003Coding

Ларавел присоединиться

use Illuminate\Support\Facades\DB;

$users = DB::table('users')
            ->join('contacts', 'users.id', '=', 'contacts.user_id')
            ->join('orders', 'users.id', '=', 'orders.user_id')
            ->select('users.*', 'contacts.phone', 'orders.price')
            ->get();
Jealous Jackal

улететь в Ларавель

$data = DB::table('post')
  ->leftJoin('category', 'post.category', '=', 'category.id')
  ->leftJoin('users', 'post.author', '=', 'users.id')
  ->orderBy('created_at', 'DESC')
  ->get();
nk jangid

Ларавел присоединиться

$users = DB::table('users')
            ->join('contacts', 'users.id', '=', 'contacts.user_id')
            ->join('orders', 'users.id', '=', 'orders.user_id')
            ->select('users.*', 'contacts.phone', 'orders.price')
            ->get();
Alberto Peripolli

слева присоединяйся к Ларавелу

$users = DB::table('users')
            ->leftJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();

$users = DB::table('users')
            ->rightJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();
Disgusted Dugong

Ларавел, где в

$users = DB::table('users')
                    ->whereIn('id', [1, 2, 3])
                    ->get();
Xanthous Xenomorph

Ответы похожие на “улететь в Ларавель”

Вопросы похожие на “улететь в Ларавель”

Больше похожих ответов на “улететь в Ларавель” по PHP

Смотреть популярные ответы по языку

Смотреть другие языки программирования