<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vitegroupltd / vitepay-laravel-integrate example snippets
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
// Other kernel properties...
/**
* The application's route middleware groups.
*
* @var array
*/
protected $routeMiddleware = [
// Other middlewares...
'vitepay' => 'App\Http\Middleware\VitePayMiddleware',
];
}
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\VitePayController;
// Other routes properties...
Route::group(['middleware' => ['vitepay']], function () {
Route::post('/vitepay/webhook', [VitePayController::class, 'webhook']);
});
}