You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicfunctionserving(): void
{
// Do I need to register these?
LaravelJsonApi::registerCollectionQuery(Users\UserCollectionQuery::class, 'users');
LaravelJsonApi::registerCollectionQuery(Clients\ClientCollectionQuery::class, 'clients');
LaravelJsonApi::registerCollectionQuery(Flags\FlagCollectionQuery::class, 'flags');
}
/** * Get the server's list of schemas. * * @return array */protectedfunctionallSchemas(): array
{
return [
Users\UserSchema::class,
Clients\ClientSchema::class,
Flags\FlagSchema::class
];
}
It looks almost identical like the dummy project in this repo.
I created everything from commandline only. The above code is the only thing I added + exception handler.
Getting started installation
Registered Schemas (Auto-discovery) -> doesn't seem to work?
Models via php artisan make:model Client -mfs
Everything in JsonApi/V1 added via php artisan jsonapi:requests Client
No controllers, no filter
Schemas + Server added with cli
Any suggestions what else I can try? Haven't found any clue in the documentation
The text was updated successfully, but these errors were encountered:
@tomsiwik yeah this was definitely something to do with your setup as far as I can tell. Unfortunately your issue doesn't give me the required information to debug - as a tip, it's best to include the stack trace for an error if you're reporting an issue that has an exception.
FYI you don't need to use LaravelJsonApi::registerCollectionQuery()
It's worth noting that the error title you've given to this issue states: Unable to create request class of type [Query]
From the information you've provided, it seems you have CollectionQuery classes, not Query classes.
If you have problems with classes not loading, another tip is to try:
I did everything the tutorial specifies but I still keep getting the same error whatever I try.
routes/api.php
Handler.php
Server.php
It looks almost identical like the dummy project in this repo.
I created everything from commandline only. The above code is the only thing I added + exception handler.
php artisan make:model Client -mfs
JsonApi/V1
added viaphp artisan jsonapi:requests Client
Any suggestions what else I can try? Haven't found any clue in the documentation
The text was updated successfully, but these errors were encountered: