pianello-api/app/View/Composers/ColorSchemeComposer.php
Ale Gallo b91cf0cbde Committing laravel + api (part 1)
committing part of the laravel system with templating files and api implementation.
2023-11-10 15:54:41 +01:00

19 lines
353 B
PHP

<?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"
);
}
}