Releases

6.11.0 5/19/2022

Added

  • setTitle for filters so the FE could display them
public static function matches(): array
{
    return [
        'invoice_id' => MatchFilter::make()
            ->setType('array')
            ->setTitle('Job Number')
            ->setRelatedRepositoryKey(InvoiceRepository::uriKey()),
    ];
}

6.10.0 5/4/2022

Added

Bulk delete flow

The payload for a bulk delete should contain an array of primary keys for the models you want to delete:

[
  1, 10, 15
]

These models will be resolved from the database and check for the deleteBulk policy permission, in case any of the models isn't allowed to be deleted, no entry will be deleted.

6.9.3 4/14/2022

Fixed

  • Change return value of handle method in getter #455

6.9.2 3/29/2022

Fixed

  • Boolean match filter

6.9.1 3/4/2022

Fixed

  • Fixing scout search.

6.9.0 3/4/2022

Added

  • Support to choose custom columns for BelongsTo and BelongsToMany and MorphMany relationships

Fixed

  • Getter requests dump

6.8.2 2/23/2022

Fixed

  • Fixed image has filesystem on null.

6.8.1 2/4/2022

Fixed

  • related fix

6.8.0 2/4/2022

Added

Load specific columns

Sometimes you might want to load specific columns from the database into the response. For example, if you have a Post model with an id, title and a description column, you might want to load only the title and the description column in the response.

In order to do this, you can use in the request:

GET /users/1?include=posts[title|description]

6.7.1 2/4/2022

Fixed

  • dd removed

6.7.0 2/4/2022

Added

By default, Restify search is case-sensitive. You can change this behavior by changing the configuration:

// restify.php

  'search' => [
      /*
      | Specify either the search should be case-sensitive or not.
      */
      'case_sensitive' => false,
  ],

6.6.0 2/2/2022

Motivation

Restify already provides powerful filters and get routes with relationships. However, sometimes you might want to get some extra data for your repositories.

Let's say you have a stripe user. This is how you retrieve the stripe user information through a get request:

Route::get('users/stripe-information', UserStripeController::class);

// UserStripeController.php

public function __invoke(Request $request)
{
  ...
}

The classic approach is good, however, it has a few limitations. Firstly, you have to manually take care of the route middleware, the testability for these endpoints should be done separately which is hard to maintain. And finally, the endpoint is disconnected from the repository, which makes it feel out of context so has a bad readability.

So, code readability, testability and maintainability become hard.

See more: https://restify.binarcode.com/api/getters

6.5.0 1/21/2022

Added

  • Allow define skipFieldFill in actions, so you can keep default behavior for actionable fields.

6.4.1 1/20/2022

Fixed

  • RestResponse index method to accept Paginator interface.

6.4.0 1/13/2022

Added

  • Laravel 9 support

6.3.0 11/30/2021

Fixed

  • Fixed conflict with telescope. See this.

Breaking change

  • Removed the AddedRepositories event, see Upgrading guideline for more details.

6.2.1 11/29/2021

6.2.0 11/25/2021

Added

  • Filtering using only query args for matchable
  • Actions are not logged if the model doesn't use HasActionLog trait.

5.12.0 11/25/2021

Fixed

  • Configurable matchable filtering.

6.0.2 11/22/2021

Fixed

Forgot

6.1.0 11/19/2021

Fixed

  • HasMany type of relationships will filter unauthorized items.

6.0.0 11/18/2021

Added

  • Laravel scout integration
  • Sorting by HasOne relationships
  • Actionable fields for Bulk store and update
  • JSON:API compliances for sorting and related
  • Added rules method for actions and deprecated payload
  • Maintenance and bug fixing

Breaking changes

  • The AuthService and AuthController was removed. Now you can use the Route::restifyAuth() macro to intantiate auth routes.

5.11.0 11/17/2021

Added

  • Use actionable fields in bulk requests #433

5.10.1 11/16/2021

Fixed

  • Reverting AuthController as it's a breaking change for a minor release.

5.10.0 11/16/2021

Fixed

  • Reverting AuthController as it's a breaking change for a minor release.

5.5.9 11/14/2021

Added

  • Docs
  • Support for include along with related to get relationships.

5.5.8 11/12/2021

Fixed

  • Closed #425

5.5.7 11/5/2021

Added

  • Repository action testing helper.

5.5.6 11/5/2021

Added

  • ok() global helper

5.5.5 10/13/2021

Added

  • Free signature for the stored hook in the repository.