public function index() { $user = Auth::user(); $users = User::whereAccountId($user->account_id)->withTrashed(); $users = $users->paginate(); $paginator = User::whereAccountId($user->account_id)->withTrashed()->paginate(); $transformer = new UserTransformer(Auth::user()->account, $this->serializer); $data = $this->createCollection($users, $transformer, 'users', $paginator); return $this->response($data); }
public function index() { $users = User::whereAccountId(Auth::user()->account_id)->withTrashed()->orderBy('created_at', 'desc'); return $this->listResponse($users); }