<?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('/', 'HomeController@index');

    //API
    $router->get('api/iptvChannel', 'ApiController@iptvChannel');
    $router->get('api/series', 'ApiController@series');
    $router->get('api/tagType', 'ApiController@tagType');
    $router->get('api/tag', 'ApiController@tag');
    $router->get('api/ftpServer', 'ApiController@ftpServer');
    $router->get('api/getIptvChannelListByKey', 'ApiController@getIptvChannelListByKey');

    //问题
    $router->resource('question', 'QuestionController');
    //选项
    $router->resource('option', 'OptionController');
    //用户
    $router->resource('user', 'UserController');
    //房间
    $router->resource('room', 'RoomController');
    $router->resource('roomquestion', 'RoomQuestionController');
    $router->resource('roomanswer', 'RoomAnswerController');
    $router->resource('roomuser', 'RoomUserController');

});
