Releases: phpsa/laravel-api-controller
Releases · phpsa/laravel-api-controller
3.2.0-beta.4
Update HasParser.php
3.2.0-beta.2: fix: improve behaviour of parent resource mapping
it will now authorize if the policy exists for the parent, and binding performance increased by using existing bound resources before trying to call it from the DB if already bound.
Initial version of nested api controller functionality
3.2.0-beta.1 parse the nested parent into the filter / store query
v3.1.1
Gated Response Fields
Example implementations
//Controller
protected $resourceModel = MyClass::class;
protected $resourceSingle = MyClassResource::class;
...
// this used to require the ID and casts where INT based. (some keys may be string based)
// passing the route param is also better long term as is more laravelEsq
public function show(MyClass $record) {
return $this->handleShowAction($record);
}
//MyClassResource
protected static array $fieldGates = [
'gate_name' => [
'field 1',
'field 2',
],
'gate_two' => [
'field 3,
]
];
v3.0.0
Fix Raw Methods
Raw Methods now apply global scopes
minor change however can have effects on your queries
Bulk Actions Update
Update to the work on builk actions, this introduces some enhancements, but should still be carefully tested before use
3.0.0-Alpha 1
3.0.0-a.1 fix(security): Make sure laravel version is after 7.30.3