7.8.0 1/17/2023


  • Now you can add a placeholder to the filter, so it renders on the frontend
'title' => MatchFilter::make()
                ->setDescription('Sort by title')

When we read match filters using: `/api/restify/posts/filters?only=matches` we will get:

      "type" => "string"
      "advanced" => false
      "title" => "Title"
      "description" => "Sort by title"
      "placeholder" => "-title"
      "column" => "title"
      "key" => "matches"


  • Tests (thanks @arthurkirkosa)

7.7.2 1/13/2023


  • Profile request class

7.7.1 11/22/2022


  • Remove Email Exist validation #518

7.7.0 9/17/2022

You can also sync your BelongsToMany field. Say you have to sync permissions to a role. You can do it like this:

POST: api/restify/roles/1/sync/permissions


  "permissions": [1, 2]

Under the hood this will call the sync method on the BelongsToMany relationship:

// $role of the id 1


Authorize sync

You can define a policy method syncPermissions. The name should start with sync and suffix with the plural CamelCase name of the model's relationship name:

// RolePolicy.php

public function syncPermissions(User $authenticatedUser, Company $company, Collection $keys): bool
    // $keys are the primary keys of the related model (permissions in our case) Restify is trying to `sync`

7.6.3 9/16/2022


  • The rest method will consider the meta information for the rest helper: rest($user)->indexMeta(['token' => $token])

7.6.1 9/15/2022


  • Serializer - Serialize One model or nothing using the show response format #510


  • Listing routes in console #514

7.6.0 9/15/2022


  • The policyMeta method is now protected at the repository level (it could be used to override the policy information for the show and index methods.
  • Do not make RelatedDto as a singleton in a test environment (this causes issues when trying to make few relationship requests to the same repository in the same test)


  • Always public index method if no policy
  • Unit test that shows routes list command.
  • Fix Gate::check - show - not working


  • Added unit tests for the testing helpers (action, route and getters).

6.12.2 9/15/2022


  • Belongs search with custom foreign key #512

7.5.4 8/2/2022


  • The unauthorized code should be 401.

7.5.3 8/1/2022


  • The testing Repository::route( method has a new signature, it accepts the action as well now.

7.5.2 7/30/2022


  • Cache enable option is considered during the policy methods check.

7.5.1 7/30/2022


  • Action logs should be enabled now.

7.5.0 7/30/2022


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 7/29/2022


  • 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.


  • 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.


  • The $eagerState repository property is now private, and it is of type null|string because it holds the parent repository that renders it.

7.3.1 7/26/2022


  • Publish provider before routes so restifyAuth macro works.

7.3.0 7/25/2022


  • Singleton could be loaded from the RestifyServiceProvider in the local repository so the dev will have control over that.

7.2.1 7/24/2022


  • Nova routes conflict.

7.2.0 7/24/2022


  • Loading routes from the LaraveRestifyApplicationProvider so developers could override or comment that out.

7.1.0 7/24/2022


  • [6.x] Bulk update and deletion callbacks.

7.0.0 7/24/2022

[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 in show 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() - see seralizer()
  • 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

6.12.1 7/15/2022


  • Bulk deletion issue

6.12.0 7/14/2022


  • Bulk side effect actions fixed.

6.11.1 7/13/2022


  • Do not check relationships if no query with relationships.

6.11.0 5/19/2022


  • setTitle for filters so the FE could display them
public static function matches(): array
    return [
        'invoice_id' => MatchFilter::make()
            ->setTitle('Job Number')

6.10.0 5/4/2022


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


  • Change return value of handle method in getter #455

6.9.2 3/29/2022


  • Boolean match filter

6.9.1 3/4/2022


  • Fixing scout search.

6.9.0 3/4/2022


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


  • Getter requests dump