<?php
# application/middleware/TestMiddleware.php

class Auth_payroll implements Luthier\MiddlewareInterface
{

    public function run($args = [])
    {
        $paket_arr     = ci()->session->userdata('paket_arr');
        $paket_payroll = ci()->session->userdata('paket_payroll');

        if ($paket_arr["payroll"] === true || $paket_payroll === '1') {
            return;
        } else {
            redirect(route('page.not.found'));
        }
    }
}
