PHP code example of httpoz / hook

1. Go to this page and download the library: Download httpoz/hook library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

httpoz / hook example snippets



/**
 * The application's route middleware.
 *
 * @var array
 */
protected $routeMiddleware = [

    // ...

    'validateHook' => \HttpOz\Hook\Http\Middleware\ValidateHookMiddleware::class,
];



// Route group
Route::group(['prefix' => 'hooks/{hook}', 'middleware' => 'validateHook'], function(){
    Route::resource('notification', 'NotificationController');
});

php artisan vendor:publish --provider="HttpOz\Hook\HookServiceProvider"