validate(); // TODO: move this to a helper class so we can reuse code between API and FE $response = Http::post(config('bot.webhook'), ['text' => $validated['quote']]); Log::create([ 'user_id' => auth()->user()->id, 'loggable_type' => Log::class, 'loggable_id' => null, 'action' => LogAction::SEND, 'content' => $validated['quote'], 'ip' => request()->ip(), ]); $this->quote = ''; } }; ?>