Answers for "laravel orwhereraw"

PHP
6

laravel orWhere

$camps = $field->camps()->where('status', 0)->where(function ($q) {
    $q->where('sex', Auth::user()->sex)->orWhere('sex', 0);
})->get();
Posted by: Guest on October-20-2020
7

laravel not in query

DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Posted by: Guest on September-26-2020
2

DB::table('users')->get();

DB::select('SELECT * FROM users WHERE name = ?', array(Input::get('name')));
Posted by: Guest on October-22-2020

Browse Popular Code Answers by Language