authorize(Permission::ACTION_ACTIVITY_READ, $server); $activity = QueryBuilder::for($server->activity()) ->with('actor') ->allowedSorts(['timestamp']) ->allowedFilters([ AllowedFilter::exact('ip'), AllowedFilter::partial('event'), ]) ->paginate(min($request->query('per_page', 25), 100)) ->appends($request->query()); return $this->fractal->collection($activity) ->transformWith($this->getTransformer(ActivityLogTransformer::class)) ->toArray(); } }