<?php

namespace App\Controllers\Admin;
use App\Models\UserModel;
use App\Models\LicenseModel;
use App\Controllers\BaseController;
class UserController extends BaseController
{
    public function __construct(){
        helper(['form']);
        $this->session = service('session');
    }
    public function index()
    {
        $userModel = new UserModel();
    	$user = $userModel->findAll();
        $data['msg'] = $this->session->getFlashdata('msg');
        $data['error'] = $this->session->getFlashdata('error');
        $data['title'] = 'Licenses';
    	$data['users']= (array)$user;
        $this->smartyView('admin/users', $data);
    }
    
}
