Lavet controller og et forsøg på GUI
This commit is contained in:
parent
32b7b3c925
commit
4e69768ae8
|
@ -253,4 +253,20 @@ class UserController extends Controller
|
||||||
{
|
{
|
||||||
return Response::detect("users.editpass");
|
return Response::detect("users.editpass");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function liveSearch(Request $request){
|
||||||
|
if($request->ajax()){
|
||||||
|
$output="";
|
||||||
|
$results=DB::table('users')->where('name_first','LIKE','%'.$request->search."%")->get();
|
||||||
|
|
||||||
|
if(!$results){
|
||||||
|
echo "idk kev";
|
||||||
|
}else{
|
||||||
|
return Response($output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,17 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||||
|
|
||||||
|
|
||||||
|
<form method="post" action="{{ route("users.store") }}">
|
||||||
|
@csrf
|
||||||
|
<input type="text" class="form-controller" id="search" name="search"></input>
|
||||||
|
<input type="submit" class="btn btn-dark text-white" value="Søg">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<table class="tbl mt-2">
|
<table class="tbl mt-2">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue