<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', function () {
        return redirect('admin/good/list');
    });

    $router->get('/key/{id}', 'GoodController@key');
    $router->get('/export/{id}', 'GoodController@export');
    $router->resource('/good/list', 'GoodController');

    $router->resource('/import', 'ImportController');

    $router->resource('/dealer', 'DealerController');

    $router->get('/code/group', 'CodeController@index');
    $router->resource('/code', 'CodeController');

//    配置
    $router->group([
        'prefix' => 'setting',
        'namespace' => 'Setting'
    ], function (Router $router) {
        //类型列表
        $router->resource('/category', 'CategoryController');
    });

});
