I am using Resource Collection to retrieve all the information from my database.
This information includes all the company information and its relationship with the company which is the industry.
It returns this error when I tried to fetch the information.
Property [name] does not exist on this collection instance.
return parent::toArray([ 'name' => $this->name, 'industry' => $this->industry ]);
May I know how to rectify this?