Releases: BinarCode/laravel-restify
Releases · BinarCode/laravel-restify
4.10.4
4.10.3
Added
- Filtering by datetimeinterval:
// Repository:
$match = [
'created_at' => RestifySearchable::MATCH_DATETIME_INTERVAL,
];
Query:
// Use isoString format
GET: /posts?created_at=created_at=2020-12-16T09:48:52.480645Z,2021-02-16T09:48:52.481004Z
This will filter by this interval.
You can also negate this by using - before the column name: -created_at=.
4.10.2
Fixed
- Sorting using BelongsTo field type. So now you can have:
// PostRepository
public static function sorts(): array
{
return [
'users.attributes.name' => SortableFilter::make()->setColumn('users.name')->usingBelongsTo(
BelongsTo::make('user', 'user', UserRepository::class),
)
];
}
And frontend can filter your posts by users.name using:
api/restify/posts?sort=users.attributes.name.
4.10.1
4.10.0
Added
- For the
BelongsToMany,MorphToManyfields now you can specify validations rules using:
BelongsToMany::make('roles', 'roles', RolesRepository::class)->validationCallback(fn(Request $request) => ....))
- Added
->unique()toBelongsToManykind fields, so you can validate unicity of your pivot table entries. - Fixed
$withsproperty for repositories when force eager loading.
4.9.2
4.9.1
4.9.0
4.8.0
Added
- Action logs - CRUD operations could be logged into your database (check the upgrade guideline to see how to benefit from this).
- Support for https://github.com/BinarCode/restifyjs/
Fixes
- JSON responses for the forgot and reset passwords.