1$users = DB::table('users')
2 ->where('votes', '>', 100)
3 ->orWhere(function($query) {
4 $query->where('name', 'Abigail')
5 ->where('votes', '>', 50);
6 })
7 ->get();
1DB::statement('DROP TABLE users');
2DB::statement('ALTER TABLE projects AUTO_INCREMENT=123');
1use Illuminate\Support\Facades\DB;
2
3$users = DB::select('select * from users');
4
5foreach ($users as $user) {
6 echo $user->name;
7}