<?php

use Illuminate\Routing\Router;

Admin::routes();

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

    $router->get('/', 'HomeController@index')->name('home');
    $router->resource('device_info', DeviceController::class);
    $router->resource('lock_info', LockController::class);
    $router->resource('device_type', DeviceTypeController::class);
    $router->resource('device_box', DeviceBoxController::class);
    $router->resource('device_type_box', DeviceTypeBoxController::class);
    $router->get('get_box', 'ApiController@get_box');

    $router->get('/setting_form', 'Config\FormController@form');
    $router->post('/setting_form_save', 'Config\FormController@setting_form_save');
    $router->resource('/setting', 'Config\ConfigController');


});
