Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -146,16 +146,16 @@ class ContactController 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 = DB::table('contacts')->where('name_first', 'LIKE',$request->search.'%')
|
||||
->orWhere('name_last','LIKE', $request->search.'%')
|
||||
$users = DB::table('contacts')->where('contactname', 'LIKE',$request->search.'%')
|
||||
->orWhere('title','LIKE', $request->search.'%')
|
||||
->orWhere('phone','LIKE', $request->search.'%')
|
||||
->orWhere('email','LIKE',$request->search. '%')->get();
|
||||
|
||||
if(count($users) !== 0){
|
||||
foreach ($users as $key => $user){
|
||||
$output.='<tr>'.
|
||||
'<td>' . $user->name_first . '</td>'.
|
||||
'<td>' . $user->name_last . '</td>'.
|
||||
'<td>' . $user->contactname . '</td>'.
|
||||
'<td>' . $user->title . '</td>'.
|
||||
'<td>' . $user->email . '</td>'.
|
||||
'<td>' . $user->phone .'</td>'.
|
||||
'<td><a href="'. route("contacts.edit", [ "contact" => $user->id ]) . '"><img class="w-100" src="'. asset('/images/icons/pencil-dark.svg') . '" alt="Update"></a></td>'.
|
||||
|
||||
Reference in New Issue
Block a user