$payload]; $response = Http::post(config('bot.webhook'), $data); } public function sendQuote(Request $request) { $quote = $request->input('quote'); if (empty($quote)) { return; } Log::create([ 'user_id' => auth()?->user()?->id ?? 1, 'loggable_type' => Quote::class, 'loggable_id' => null, 'action' => LogAction::SEND, 'content' => $quote, 'ip' => request()->ip(), ]); $this->webHookSend($quote); } public function sendRandomQuote() { $quote = Quote::inRandomOrder()->first(); Log::create([ 'user_id' => auth()?->user()?->id ?? 1, 'loggable_type' => Quote::class, 'loggable_id' => $quote->id, 'action' => LogAction::REQUEST, 'content' => 'Random quote requested', 'ip' => request()->ip(), ]); $this->webHookSend($quote->quote); } public function test() { var_dump('secrets'); } }