Skip to content

3.16.0

Choose a tag to compare

@binaryk binaryk released this 02 Sep 13:14
· 7 commits to 3.x since this release
e6ff1e9

Added

Standalone actions

Sometimes you don't need to have an action with models. Let's say for example the authenticated user wants to disable his account. For this we have standalone actions:

// UserRepository

    public function actions(RestifyRequest $request)
    {
        return [
            DisableProfileAction::new()->standalone(),
        ];
    }

URI Key

Usually the URL for the action is make based on the action name. You can use your own URI key if you want:

class DisableProfileAction extends Action
{
    public static $uriKey = 'disable_profile';

    //...
}