<?php

namespace App\Controllers;

class Dashboard extends BaseController
{
    public function index()
    {
        if (!session()->get('isLoggedIn')) {
            return redirect()->to('/auth/login');
        }

        $data['title'] = 'My Dashboard';
        $data['role'] = session()->get('role');
        $data['name'] = session()->get('name');

        return view('dashboard/index', $data);
    }
}
