12345678910111213141516171819 |
- <?php
- namespace middleware;
- use Closure;
- use Qii\Base\Middleware\Request as Middleware;
- use \Qii\Base\Request;
- class auth implements Middleware
- {
- public function __construct()
- {
- }
- public function handle(Request $request, Closure $next) {
- if (!$_SESSION['admin']) {
- return "This need login <br />";
- }
- return $next($request);
- }
- }
|