Fix live search again
This commit is contained in:
@@ -171,6 +171,11 @@ class ContactController extends Controller
|
||||
}else{
|
||||
$output.='<tr>'.
|
||||
'<td>Din søgning matchede ikke nogen personer</td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'</tr>';
|
||||
}
|
||||
return Response($output);
|
||||
|
||||
@@ -167,6 +167,14 @@ class EventController extends Controller
|
||||
'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
}else{
|
||||
$output.='<tr>'.
|
||||
'<td>Intet match</td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'</tr>';
|
||||
}
|
||||
return Response($output);
|
||||
}
|
||||
|
||||
@@ -164,6 +164,16 @@ class MenuPlanController extends Controller
|
||||
'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
}else{
|
||||
$output.='<tr>'.
|
||||
'<td>Intet match</td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'</tr>';
|
||||
}
|
||||
return Response($output);
|
||||
}
|
||||
|
||||
@@ -143,6 +143,13 @@ class rolesController extends Controller
|
||||
'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
}else{
|
||||
$output.='<tr>'.
|
||||
'<td>Intet match</td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'</tr>';
|
||||
}
|
||||
return Response($output);
|
||||
}
|
||||
|
||||
@@ -287,16 +287,16 @@ class UserController extends Controller
|
||||
"<th style=\"width: 1em;\"><img class=\"w-100\" src=\"http://127.0.0.1:8000/images/icons/pencil.svg\" alt=\"Update\"></th>".
|
||||
"<th style=\"width: 1em;\"><img class=\"w-100\" src=\"http://127.0.0.1:8000/images/icons/trashcan.svg\" alt=\"Delete\"></th>".
|
||||
"</tr>";
|
||||
$users = User::query()->
|
||||
where('name_first', 'LIKE',$request->search.'%')
|
||||
$users = User::query()->where('name_first', 'LIKE',$request->search.'%')
|
||||
->orWhere('name_last','LIKE', $request->search.'%')
|
||||
->orWhere('phone','LIKE', $request->search.'%')
|
||||
->orWhere('email','LIKE',$request->search. '%')
|
||||
|
||||
->orWhere('name','LIKE',$request->search. '%')
|
||||
->get();
|
||||
|
||||
if(count($users) !== 0){
|
||||
foreach ($users as $key => $user){
|
||||
|
||||
$roles = null;
|
||||
$rolesString = null;
|
||||
|
||||
@@ -318,7 +318,7 @@ class UserController extends Controller
|
||||
'<td>' . $user->name_last . '</td>'.
|
||||
'<td>' . $user->email . '</td>'.
|
||||
'<td>' . $user->phone .'</td>'.
|
||||
'<td>' . $rolesString .'</td>'.
|
||||
'<td>' . $user->name .'</td>'.
|
||||
'<td><a href="'. route("users.edit", [ "user" => $user->id ]) . '"><img class="w-100" src="'. asset('/images/icons/pencil-dark.svg') . '" alt="Update"></a></td>'.
|
||||
'<td><form method="post" action="' .route("users.destroy", [ "user" => $user->id ]). '" class="w-100 nostyle">'.
|
||||
csrf_field().
|
||||
@@ -329,6 +329,16 @@ class UserController extends Controller
|
||||
'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
}else{
|
||||
$output.='<tr>'.
|
||||
'<td>Intet match</td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'<td></td>'.
|
||||
'</tr>';
|
||||
}
|
||||
return Response($output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user