Closed cunhar closed 5 years ago
So it works out the namespace based on the JSON API resource name. As you've used locationreports
that equals Locationreports
because you haven't put a -
or _
in the name, i.e. location-reports
or location_reports
depending on your API's convention.
createAdapterFromClassName seems to be only upper casing the resource name's first letter.
Am I doing something wrong when having Resources that have Two uppercase letters
IE: Locationreports vs LocationReports
json-api-default
'locationreports' => \App\LocationReport::class
ROUTES:
$api->resource('locationreports')->relationships(function ($relations) { $relations->hasOne('lapa'); $relations->hasOne('installation'); });
ADAPTER:
namespace App\JsonApi\LocationReports;
SCHEMA:
protected $resourceType = 'locationreports';