A lot of things.

This commit is contained in:
2026-05-27 21:24:38 +02:00
parent b361f07954
commit d02baa89d6
43 changed files with 1340 additions and 231 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers;
use App\Models\Entry;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
class WebhookController extends Controller
{
public function XenForoNewPost(Request $request)
{
if( $request->header('XF-Webhook-Secret') !== env('WEBHOOK_SECRET') )
abort(403);
$threadId = $request->input('data.thread_id');
if( $threadId ){
$entry = Entry::where('comments_thread_id', $threadId)->first();
if( $entry ){
Cache::forget("entry_comments_{$entry->id}");
}
}
return response()->json(['success' => true]);
}
}