feat: more work on completing switchover
This commit is contained in:
24
site/app/Livewire/Themeswitch.php
Normal file
24
site/app/Livewire/Themeswitch.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user