You have both name() method for faker in the factory and $this->categories->name in the resource. One of those is breaking the call. The categories being a collection instance instead of a model is my theory, but without more code, I can't tell for sure.