On accessing the “Artist Lists” collection in the UI, errors and returns 500 error on api - No model found for collection ArtistList
I’ve also noticed the generated forest schema doesn’t have a class given for the virtual class artistList like it does the other classes - is that intended?
I think that the issue come from the route declaration.
The route was declared in api.php and by default all the routes in api.php has the prefix “api”.
Can you check if the route forest/artistList has the prefix “api” with the command php artisan route:list ?
If so, you can remove the prefix “api” in the boot() function of the RouteServiceProvider.php or declare this route in web.php.
Yep sorry didn’t notice that - that’s resolved it by moving the route definition into the web.php file rather than api.php so it doesn’t have the /api prefix.
I have another question about related data for SmartCollection but will open a new thread.