<?php

namespace App\Controllers;

use App\Controllers\BaseController;

class Viewmode extends BaseController
{
    public function index($view_mode = VIEW_MODE_IMPRESION)
    {
        $session = session();
        $viewMode = $view_mode;
        $session->remove('view_mode');
        $session->set('view_mode', $viewMode);
        $url = previous_url();
        return redirect()->to($url);
    }
}
