first(); $automation?->update(['enabled' => ! $automation->enabled]); } public function render() { return view('livewire.automations.index', [ 'automations' => Automation::orderBy('name')->get(), ]); } }