<?php

use Encore\Admin\Facades\Admin;
use Illuminate\Routing\Router;

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')->name('admin.home');
    $router->resource('votes/{vote}/items', 'ItemController');
    $router->resource('votes', 'VoteController');
    $router->resource('users', 'UserController');
    $router->resource('articles', 'ArticleController');

});
