Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow custom design patterns #248

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

jaulz
Copy link
Contributor

@jaulz jaulz commented Jul 27, 2023

This PR allows custom patterns to be registered via:

    $this->app->extend(ActionManager::class, function (ActionManager $actionManager) {
      $actionManager->registerDesignPattern(new FooBarDesignPattern());

      return $actionManager;
    });

@lorisleiva
Copy link
Owner

Thanks! FYI, you can also use the Facade to update the Action Manager like so.

use Lorisleiva\Actions\Facades\Actions;

Actions::registerDesignPattern(new FooBarDesignPattern());

@lorisleiva lorisleiva merged commit 0b1896c into lorisleiva:main Jul 27, 2023
8 checks passed
@jaulz
Copy link
Contributor Author

jaulz commented Jul 28, 2023

Ah, thanks for the merges and the hint 😊

@jaulz jaulz deleted the patch-2 branch July 28, 2023 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants