<?php

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

//Menu itens
RouteCollection::get('*', function() {
    Output::addOnSubmenu('config', '/glossary', 'glossary', icon('cubes'), ['class' => 'nav-link']);
}, -10)->doIgnore();

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