chunkWithAuthorization($count, $callback, function ($models) { return $this->deletableModels($models); }); } /** * Get the models that may be deleted. * * @param \Illuminate\Support\Collection $models * @return \Illuminate\Support\Collection */ protected function deletableModels(Collection $models) { return $models->mapInto($this->resource()) ->filter ->authorizedToForceDelete($this) ->map->model(); } }