xmrmemes/app/Http/Controllers/ThemeSwitcherController.php

15 lines
290 B
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ThemeSwitcherController extends Controller
{
public function theme(Request $request, $style)
{
$request->session()->put('theme', $style);
return redirect()->away(url()->previous());
}
}