lundi 27 mars 2017

Laravel 5 Eloquent where and orwhere

i try to get results from table with multiple where and/or clauses. But I am not receiving the good result!

$queries = journal::where(function($query)
{
$term =Input::get('text');
$query->where('titre', 'like', '%'.$term.'%')
    ->where('etat','!=','9')
    ->where('type', 0)
    ->orWhere('type', 1);
})->take(10)->get();    



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2nX9Xm0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire