Skip to content

astrnt/core-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core Web App - Core Module

Installation

composer require gerizal/core-module dev-master

Hooks

To use action and filter hooks, please follow these steps:

Open config/app.php file and add this to the providers array:

Modules\Core\Providers\CwaHookServiceProvider::class,

Next, add this to the aliases array:

'CwaHooks' => Modules\Core\Facades\CwaHooks::class,

If you open the Providers/CwaHookServiceProvider.php, there are action and filter hook for testing. To use those hooks, you can try something like this:

\CwaHooks::action('cwa.test.action.hook', 'awesome');
\CwaHooks::filter('cwa.test.filter.hook', 'awesome');

To test the hooks via blade template, you can try something like this:

@action('cwa.test.action.hook', 'awesome')
@filter('cwa.test.filter.hook', 'awesome')

Hooks Development

Right now, the action and filter hooks are just for testing. For future development, if there is some hooks that needs to be implemented in Core Web App, the main file to add hooks (both action and filter) will be in Providers/CwaHookServiceProvider.php.