<?php
/**
 * app/controllers/admin/logs.php
 *
 * This is the generic logs controller.
 *
 * @version 3.0
 * @author  Joey Kimsey <Joey@thetempusproject.com>
 * @link    https://TheTempusProject.com
 * @license https://opensource.org/licenses/MIT [MIT LICENSE]
 */
namespace TheTempusProject\Controllers\Admin;

use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Classes\AdminController;
use TheTempusProject\Models\Log;

class Logs extends AdminController {
    public static $log;

    public function __construct() {
        parent::__construct();
        self::$title = 'Admin - Logs';
        self::$log = new Log;
    }

    public function index( $data = null ) {
        Views::view( 'admin.logs.error_list', self::$log->list( 'error' ) );
        Views::view( 'admin.logs.admin_list', self::$log->list( 'admin' ) );
        Views::view( 'admin.logs.login_list', self::$log->list( 'login' ) );
    }
}
