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
I'm setting up an example application as documented on Github and I get this error:
FatalThrowableError in MappingFactory.php line 93:
Type error: Argument 1 passed to NilPortugues\Api\Mapping\MappingFactory::fromArray() must be of the type array, string given, called in /var/www/html/..../vendor/nilportugues/laravel5-json-api/src/NilPortugues/Laravel5/JsonApi/Mapper/Mapper.php on line 24
I just the default Employees and Orders resources.
By the way, I had to add these lines to EmployeesTransformer
public function getRequiredProperties()
{
return [];
}
And namespace App\Http\Controllers\Api; to the namespace of EmployeesController.
Another informations:
The transformers are located in App/Model/Api
The models are located in App/Model/Database
The controllers in App/Http/Controllers/Api
Anything else I should provide (the code, apart from what i posted above is exactly the same as in the documentation) ?
The text was updated successfully, but these errors were encountered:
I'm setting up an example application as documented on Github and I get this error:
I just the default Employees and Orders resources.
By the way, I had to add these lines to EmployeesTransformer
And
namespace App\Http\Controllers\Api;
to the namespace of EmployeesController.Another informations:
The transformers are located in App/Model/Api
The models are located in App/Model/Database
The controllers in App/Http/Controllers/Api
Anything else I should provide (the code, apart from what i posted above is exactly the same as in the documentation) ?
The text was updated successfully, but these errors were encountered: