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