httpoz/hook is a Laravel package for package for allowing and monitoring a[pp access..
It currently has 0 GitHub stars and 54 downloads on Packagist (latest version v0.4.0).
Install it with composer require httpoz/hook.
Discover more Laravel packages by httpoz
or browse all Laravel packages to compare alternatives.
Last updated
Add the package to your project via composer.
composer require httpoz/hooks
Run this to publish the package's migrations
php artisan vendor:publish --provider="HttpOz\Hook\HookServiceProvider"
This package comes with ValidateHookMiddleware. You need to add it to your app/Http/Kernel.php.
<?php
/**
* The application's route middleware.
*
* @var array
*/
protected $routeMiddleware = [
// ...
'validateHook' => \HttpOz\Hook\Http\Middleware\ValidateHookMiddleware::class,
];
Now you can add this middleware to your routes. You will also need the prefix, you can call it anything you want but the hook id itself should be the second segment in your url.
<?php
// Route group
Route::group(['prefix' => 'hooks/{hook}', 'middleware' => 'validateHook'], function(){
Route::resource('notification', 'NotificationController');
});