diff --git a/CHANGELOG.md b/CHANGELOG.md index d49d7fb..d41658d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## 0.3.0 - 2020-06-07 - - ability to change button text - ability to use action button on detail view + +## 0.4.0 - 2020-06-19 +- ability to pass an instance of the action class instead of class name #9 diff --git a/README.md b/README.md index 124731a..c3f3039 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,12 @@ public function fields() return [ ActionButton::make('Action') ->action(ChangeRole::class, $this->id) + //->action(new ChangeRole(), $this->id) using a new instance ]; } ``` -The `action()` method requires two params - the action class name, and the target resource id. +The `action()` method requires two params - the action class name or a new instance, and the target resource id. ## ![Basic example](images/basic_example.png)