<?php
/**
 * Created by PhpStorm.
 * User: nxtvadmin
 * Date: 2018/7/17
 * Time: 13:59
 */

namespace App\Http\Routes\Web;

use Illuminate\Contracts\Routing\Registrar;
use Illuminate\Support\Facades\Route;

class AuthenRoute
{

    public function map(Registrar $router, $callback)
    {
        if (is_subclass_of($this, __CLASS__)) {
            #子类调用
            Route::group(
                ['prefix' => 'web', 'middleware' => ['web','admin.login'], 'namespace' => 'Web'],
                function ($router) use ($callback) {
                    $callback($router);
                }
            );
        }
    }
}
