Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Custom Decorators

CrixuAMG edited this page Mar 11, 2018 · 2 revisions

Within a custom decorator (php artisan make:decorator) you can put any code you want to execute before or after the nested decorators. For example:

  • Firing off events/emails/notifications
  • Security checks

Just make sure any custom decorator extends CrixuAMG\Decorators\AbstractDecorator, that allows you to easily implement logic for the basic REST routes. Within any method, just call $this->next-><METHOD_NAME>(ARGUMENTS).

Clone this wiki locally