<?php

namespace App\Filters;

use CodeIgniter\Filters\FilterInterface;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;

class LoginFilter implements FilterInterface{
	
	 
	public function before(RequestInterface $request, $params = null)
    {
        // if no user is logged in then send them to the login form
        //$this->session = session();
	 	if(!session()->has('logged_user'))
	 	{
	 		return redirect()->to('/');
		}
    }
	public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
    {

    }
	
}