<?php

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

Route::group([
    'namespace'  => 'Area',
    'middleware' => config('api.route.middleware_auth'),
], function (Router $router) {
    $router->get('areas', 'IndexController@index');
    $router->get('areas/show', 'IndexController@show');
    $router->get('areas/codes', 'IndexController@codes');
    $router->get('areas/generate', 'IndexController@generate');
});


Route::group([
    'namespace'  => 'Area',
    'middleware' => config('api.route.middleware_auth'),
], function (Router $router) {
    $router->get('areas/{code}/show', 'AreaCodeController@show');
    $router->post('areas/code/{code}/verify', 'AreaCodeController@verify');
});

Route::group([
    'namespace'  => 'Area',
    'middleware' => config('api.route.middleware_guess'),
], function (Router $router) {
    $router->get('areas/code/info', 'AreaCodeController@info');
});

