Made it so they can now make there own dynamic guide

This commit is contained in:
2020-08-04 15:29:08 +02:00
parent 210aa00fc6
commit 9dd09f2205
4 changed files with 46 additions and 7 deletions
@@ -146,6 +146,18 @@ 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>";
if($request->isCheck === "navn")
$users = Contact::query()->where('contactname', 'LIKE',$request->search.'%')->get();
elseif ($request->isCheck === "titel")
$users = Contact::query()->where('title', 'LIKE',$request->search.'%')->get();
elseif ($request->isCheck === "email")
$users = Contact::query()->where('email', 'LIKE',$request->search.'%')->get();
elseif ($request->isCheck === "tf")
$users = Contact::query()->where('phone', 'LIKE',$request->search.'%')->get();
else
$users = DB::table('contacts')->where('contactname', 'LIKE',$request->search.'%')
->orWhere('title','LIKE', $request->search.'%')
->orWhere('phone','LIKE', $request->search.'%')
@@ -170,7 +182,7 @@ class ContactController extends Controller
}
}else{
$output.='<tr>'.
'<td>Din søgning matchede ikke nogen personer</td>'.
'<td>Intet match</td>'.
'<td></td>'.
'<td></td>'.
'<td></td>'.