<?php

use App\Core\Template\Output as Output;
use Routes\RouteCollection as RouteCollection;
use ORM\DBInstance as DB;
use App\Core\Cache\Classes\Cache as Cache;
//Menu itens
RouteCollection::get('*', function () {
    Output::addOnSubmenu('dev', '/cache', "Cache", "", ['class' => 'nav-link']);
}, -10)->doIgnore();

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