<?php

// 登录
Route::match(['get', 'post'], 'login', 'AuthController@login')->name('login');

Route::middleware(['merchant.auth'])->group(function ($route) {
    $route->get('dashboard', 'IndexController@dashboard')->name('dashboard');
    $route->get('/', 'IndexController@index')->name('index');

    $route->get('logout', 'AuthController@logout')->name('logout');
    $route->get('coupons', 'Coupon\IndexController@index')->name('coupons');
    $route->get('coupons/{coupon}/profit', 'Coupon\IndexController@profit')->name('coupons.profit');
    $route->any('coupons/profits', 'Coupon\IndexController@profits')->name('coupons.profits');

    $route->any('setting/password', 'Setting\IndexController@password')->name('setting.password');

    $route->get('census', 'Census\IndexController@index')->name('census');

    $route->get('unionpay/coupons', 'Unionpay\CouponController@index')->name('unionpay.coupons');

});
