<?php

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

//Menu itens
RouteCollection::get('*', function() {
    Output::addOnSubmenu('geo', '/zone', "Localidades", "", ['class' => 'nav-link']);
}, -10)->doIgnore();

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