gerizal/core-module

Core Module for Core Web App Platform.

Installs: 1 752

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:cwa-module

1.3.0 2022-01-28 12:06 UTC

This package is auto-updated.

Last update: 2024-05-28 17:22:44 UTC


README

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.