<?php

use App\Core\Template\Output as Output;
use Routes\RouteCollection as RouteCollection;

//Menu itens
RouteCollection::get('*', function() {
    //Output::addMenu('/state', 'state', "<i class='fa fa-fa-cubes'></i>", ['class' => 'nav-link']);
    Output::addOnSubmenu('geo', '/state', 'Estados', "", ['class' => 'nav-link']);
}, -10)->doIgnore();

RouteCollection::group("/state", function(){
    RouteCollection::get   ("/",            "\App\Geo\State\StateController@index");
    RouteCollection::get   ("/form",        "\App\Geo\State\StateController@create");
    RouteCollection::get   ("/select",      "\App\Geo\State\StateController@loadSelect");
    RouteCollection::post  ("/",            "\App\Geo\State\StateController@store");
    RouteCollection::get   ("/search",      "\App\Geo\State\StateController@search");
    RouteCollection::post  ("/search",      "\App\Geo\State\StateController@search");
    RouteCollection::get   ("/[i:id]",      "\App\Geo\State\StateController@show");
    RouteCollection::get   ("/[i:id]/edit", "\App\Geo\State\StateController@edit");
    RouteCollection::put   ("/[i:id]/edit", "\App\Geo\State\StateController@update");
    RouteCollection::delete("/[i:id]",      "\App\Geo\State\StateController@destroy");
});