25 lines
362 B
PHP
25 lines
362 B
PHP
|
<?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');
|
||
|
}
|
||
|
}
|