hy i'm using this search, but unfort not working if i will search by both f.name l.name... this is the code
if (Input::has('name'))
{
$name = Input::get('name');
$name = T_entity_details::where('First_Name','LIKE','%'.$name.'%')
->where('Last_Name','LIKE','%'.$name.'%','or')
->where('Entity_Id','!=',$this->userId)
->get(array('Entity_Id'))
->toArray();
$array1 = [];
foreach ($name as $value) {
array_push($array1, $value['Entity_Id']);
}
}else{
$name = T_entity_details::where('Entity_Id','!=',$this->userId)
->get(array('Entity_Id'))
->toArray();
$array1 = [];
foreach ($name as $value) {
array_push($array1, $value['Entity_Id']);
}
}
ive tryed the lavaret docs, trying with OR but nothing....