Exemplo n.º 1
0
 public function listUsers()
 {
     $ex = User::join('role_user', 'users.id', '=', 'role_user.user_id')->join('roles', 'role_user.role_id', '=', 'roles.id')->where('role_title', '=', 'Cliente')->where('active', '=', '1')->has('clientes', '<', 1)->get(['users.*'])->lists('username', 'id')->toArray();
     $ac = User::where('id', '=', $this->user_id)->lists('username', 'id')->toArray();
     return $ex + $ac;
 }