<?php
$users = DB::table('users')->select(DB::Raw('users.*, posts.title'))
->leftJoin('posts', 'posts.user_id', '=', 'users.id')
->where('users.id', '<', 10)
->take('20')
->get();
$users = \App\User::select(DB::Raw('users.*, posts.title'))
->leftJoin('posts', 'posts.user_id', '=', 'users.id')
->where('users.id', '<', 10)
->take('20')
->get();
?>
• | Validation: Validator |
• | Query Builder: Insert, Update, Delete |
• | Database: Insert, Update, Delete |