diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index e540d092..86aa20ab 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -90,11 +90,11 @@ class UserRepository extends Repository } if ($request->filled('name')) { - $where['name'] = $request->name; + $where[] = ['name', 'LIKE', '%'.$request->name.'%']; } if ($request->filled('email')) { - $where['email'] = $request->email; + $where[] = ['email', 'LIKE', '%'.$request->email.'%']; } if ($request->filled('state')) { diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index 6edef019..f58f1c15 100644 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -2,12 +2,26 @@ @section('title', 'Users') @section('actions') -
  • - Profile Fields +
  • + Profile Fields
  • - -
  • - @lang(UserState::label(UserState::PENDING)) +
  • + @lang(UserState::label(UserState::PENDING)) +
  • +
  • + @lang(UserState::label(UserState::ACTIVE)) +
  • +
  • + @lang(UserState::label(UserState::REJECTED)) +
  • +
  • + @lang(UserState::label(UserState::ON_LEAVE)) +
  • +
  • + @lang(UserState::label(UserState::SUSPENDED)) +
  • +
  • + @lang(UserState::label(UserState::DELETED))
  • @endsection diff --git a/resources/views/admin/users/search.blade.php b/resources/views/admin/users/search.blade.php index 38b5f6f7..60182070 100644 --- a/resources/views/admin/users/search.blade.php +++ b/resources/views/admin/users/search.blade.php @@ -10,12 +10,6 @@ {{ Form::label('email', 'Email:') }} {{ Form::text('email', null, ['class' => 'form-control']) }}   - {{--{{ Form::label('dep_icao', 'Departure:') }} - {{ Form::select('dep_icao', $airports, null , ['class' => 'form-control']) }} -   - {{ Form::label('arr_icao', 'Arrival:') }} - {{ Form::select('arr_icao', $airports, null , ['class' => 'form-control']) }} -  --}} {{ Form::submit('find', ['class' => 'btn btn-primary']) }}   clear