lchhieu/do_action

Do action package invokes all functions attached to action hook in Laravel

dev-master 2018-11-06 07:18 UTC

This package is auto-updated.

Last update: 2024-04-07 01:03:37 UTC


README

Actions are pieces of code you want to execute at certain points in your code. Actions never return anything but merely serve as the option to hook in to your existing code without having to mess things up.

Filters are made to modify entities. They always return some kind of value. By default they return their first parameter and you should too.

Installation

  1. Install using Composer
composer require lchhieu/do_action

If you're using Laravel 5.5 or later you can start using the package at this point. Eventy is auto-discovered by the Laravel framework.

  1. Add the service provider to the providers array in your config/app.php.
    'Lchhieu\DoAction\Providers\DoActionServiceProvider', 
  1. Add the facade in config/app.php
    'Actions'      => Lchhieu\DoAction\Facades\Actions::class,
    'Filters'      => Lchhieu\DoAction\Facades\Filters::class,