<?php namespace App\Livewire; use Livewire\Component; class Themeswitch extends Component { public function light() { session(['preferred_theme' => 'light']); } public function dark() { session(['preferred_theme' => 'dark']); } public function render() { return view('livewire.themeswitch'); } }