Releases: BinarCode/laravel-restify
Releases · BinarCode/laravel-restify
7.5.2
7.5.1
7.5.0
Added
This will enable policies to be cached by adding the configuration:
'cache' => [
/*
| Specify the cache configuration for the resources policies.
| When enabled, methods from the policy will be cached for the active user.
*/
'policies' => [
'enabled' => true,
/*
| ttl in seconds
*/
'ttl' => 5 * 60,
],
],
7.4.0
Added
- Added support for nested relationships when you want to get the parent and children in the same query. Imagine a tweet thread, where you want to list all tweets with its parent tweet along with its immediate children tweets. This is now possible and will do not run into infinite loop issue.
Fixed
- Support to mock repositories using
YourRepository::partialMock()
for the index request, previously it ran into the mock state and didn't update the second resources in tests.
Breaking
- The
$eagerState
repository property is now private, and it is of typenull|string
because it holds the parent repository that renders it.
7.3.1
7.3.0
7.2.1
7.2.0
7.1.0
7.0.0
[7.0.0] 2022-07-24
- Adding support for custom ActionLogs (ie
ActionLog::register("project marked active by user Auth::id()", $project->id)
) - Ensure
$with
loads relationship inshow
requests - Make sure any action isn't permitted unless the Model Policy exists
- Having a helper method that allow to return data using the repository from a custom controller
PostRepository::withModels(Post::query()->take(5)->get())->include('user')->serializeForShow()
- seeseralizer()
- Ability to make an endpoint public using a policy method
- Load specific fields for nested relationships (ie:
api/restify/company/include=users.posts[id, name].comments[title]
) - Load nested for relationships with a nested level higher than 2 (so now you can load any nested level you need
a.b.c.d
) - Shorter definition of Related fields
HasMany::make('posts')
- Performance improvements
see Change Log and Upgrading guideline