<?php

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

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

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