Added webhook to capture incoming webhooks
This commit is contained in:
parent
013bb632d3
commit
a32e8e9d05
@ -2,9 +2,17 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class WelcomeController extends Controller
|
class WelcomeController extends Controller
|
||||||
{
|
{
|
||||||
public function home() {
|
public function home() {
|
||||||
return view('welcome.home');
|
return view('welcome.home');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function webhook(Request $request)
|
||||||
|
{
|
||||||
|
Log::channel('webhook')->debug('Webhook event',['request'=>$request]);
|
||||||
|
}
|
||||||
}
|
}
|
@ -54,6 +54,12 @@ return [
|
|||||||
'days' => 14,
|
'days' => 14,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'webhook' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/webhook.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
'driver' => 'slack',
|
'driver' => 'slack',
|
||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\{AdminController,CheckoutController,ProductController,ResellerServicesController};
|
use App\Http\Controllers\{AdminController,
|
||||||
|
CheckoutController,
|
||||||
|
ProductController,
|
||||||
|
ResellerServicesController,
|
||||||
|
WelcomeController};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -31,3 +35,6 @@ Route::group(['middleware'=>'auth:api'], function() {
|
|||||||
Route::post('/u/checkout/fee/{o}',[CheckoutController::class,'fee'])
|
Route::post('/u/checkout/fee/{o}',[CheckoutController::class,'fee'])
|
||||||
->where('o','[0-9]+');
|
->where('o','[0-9]+');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::any('/intuit/webhook',[WelcomeController::class,'webhook'])
|
||||||
|
->where('o','[0-9]+');
|
Loading…
Reference in New Issue
Block a user