pianello-api/app/View/Composers/ColorSchemeComposer.php

20 lines
353 B
PHP
Raw Normal View History

<?php
namespace App\View\Composers;
use Illuminate\View\View;
class ColorSchemeComposer
{
/**
* Bind color scheme value to the view.
*/
public function compose(View $view): void
{
$view->with(
'colorScheme',
session()->has('color_scheme') ? session('color_scheme') : "default"
);
}
}