Can you show the migration ?
Have you tried to dd($this) and see what data does the object have ?
k2oumais liked this reply
I dont have a migration, because the table is already filled in the database.
I found out that I wasnt calling the resource with a collection.
In the controller I just had to:
public function showCountries()
{
return CountryResource::collection(
Country::all()
);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community