laravel whereRaw

150

laravel whereRaw -

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();

laravel where like -

$users = DB::table('users')
                ->where('name', 'like', 'T%')
                ->get();

Comments

Submit
0 Comments