bots = \App\Models\Bot::all(); } public function toggleBot($botId) { $bot = \App\Models\Bot::find($botId); if ($bot) { $bot->enabled = !$bot->enabled; $bot->save(); $this->bots = \App\Models\Bot::all(); // Refresh the list flash()->success("Bot '{$bot->name}' has been " . ($bot->enabled ? 'enabled' : 'disabled') . "."); } } public function render() { return view('livewire.bots-list'); } }