<?php

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

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

RouteCollection::group("/country", function(){
    RouteCollection::get   ("/",            "\App\Geo\Country\CountryController@index");
    RouteCollection::get   ("/table",       "\App\Geo\Country\CountryController@table");
    RouteCollection::post  ("/table",       "\App\Geo\Country\CountryController@searchTable");
    RouteCollection::get   ("/form",        "\App\Geo\Country\CountryController@create");
    RouteCollection::get   ("/raw",         "\App\Geo\Country\CountryController@raw");
    RouteCollection::post  ("/",            "\App\Geo\Country\CountryController@store");
    RouteCollection::post  ("/search",      "\App\Geo\Country\CountryController@search");
    RouteCollection::get   ("/[i:id]",      "\App\Geo\Country\CountryController@show");
    RouteCollection::get   ("/[i:id]/edit", "\App\Geo\Country\CountryController@edit");
    RouteCollection::put   ("/[i:id]/edit", "\App\Geo\Country\CountryController@update");
    RouteCollection::delete("/[i:id]",      "\App\Geo\Country\CountryController@destroy");
});