Skip to content

Releases: BinarCode/laravel-restify

4.10.4

24 Feb 12:13

Choose a tag to compare

Added

  • Authorization configuration for the restifyjs.

4.10.3

16 Feb 09:49

Choose a tag to compare

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

11 Feb 11:07
5515263

Choose a tag to compare

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

05 Feb 15:22

Choose a tag to compare

Fixed

  • Fixed the php artisan restify:setup command issue with the config publishing.

4.10.0

18 Jan 13:52
4c57a3c

Choose a tag to compare

Added

  • For the BelongsToMany, MorphToMany fields now you can specify validations rules using:
BelongsToMany::make('roles', 'roles', RolesRepository::class)->validationCallback(fn(Request $request) => ....))
  • Added ->unique() to BelongsToMany kind fields, so you can validate unicity of your pivot table entries.
  • Fixed $withs property for repositories when force eager loading.

4.9.2

12 Jan 10:12
a04d5b2

Choose a tag to compare

Added

  • Model guesser, so if you have ArticleRepository for example, Restify will guess the model App\Models\Article so you don't have to define the model static property.

4.9.1

06 Jan 21:47
c1187f1

Choose a tag to compare

Added

  • data helper

4.9.0

05 Jan 06:25
87ac7a2

Choose a tag to compare

Added

  • PHP 8.0 Support.

4.8.0

30 Dec 20:28
5ceef21

Choose a tag to compare

Added

Fixes

  • JSON responses for the forgot and reset passwords.

4.7.0

27 Dec 07:35
773cd66

Choose a tag to compare

Added