<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->resource('users', 'UserController');
    $router->resource('member', 'MemberController');
    $router->resource('setting', 'SettingController');
    $router->resource('incomeRecord', 'IncomeRecordController');
    $router->resource('withdraw', 'UserWithdrawController');
    $router->resource('shareSetting', 'ShareConfigController');
    $router->post('shareSetting/save', 'ShareConfigController@save');

    $router->resource('setting', 'SettingController');
    $router->put('setting', 'SettingController@setting');

});
