# CheckLogin

class CheckLogin implements Middleware

## Methods

`public static` | `` | `handle($req, $res, Closure $next)` | No description |

## Details

at line 7

### `handle()`

`public static handle($req, $res, Closure $next)`

#### Parameters

| `$req` |
| `$res` |
`Closure` | `$next` |

## Source code

    <?php

    	namespace Middlewares;

    	class CheckLogin implements \App\Khan\Contracts\Middlewares\Middleware {

    		public static function handle($req, $res, $next){

    			if(isset($_SESSION)){
    				if(!isset($_SESSION['id']) && !isset($_SESSION['email'])){
    					redirect('../login');
    				}
    			}

    			$next($req, $res);

    		}

    	}