Ajusting welcome module
This commit is contained in:
@@ -1,8 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use RR\Response;
|
use App\Core\Template\Output as Output;
|
||||||
use App\Core\Template\Output as Output;
|
|
||||||
use Routes\RouteCollection as RouteCollection;
|
use Routes\RouteCollection as RouteCollection;
|
||||||
|
|
||||||
RouteCollection::add('get', '/', '\App\Core\Welcome\WelcomeController@welcome');
|
//Menu itens
|
||||||
|
RouteCollection::get('*', function() {
|
||||||
|
|
||||||
|
Output::headAdd('/', 'Dashboard');
|
||||||
|
// Output::addMenu('/', 'Dashboard', "<i class='fa fa-dashboard'></i>", ['class' => 'nav-link']);
|
||||||
|
Output::addSubMenu('dashboard', 'Dashboard', "<i class='fa fa-dashboard'></i>", ['class' => 'nav-link']);
|
||||||
|
Output::addOnSubMenu('dashboard', '/', 'Dashboard', "<i class='fa fa-dashboard'></i>", ['class' => 'nav-link']);
|
||||||
|
Output::addOnSubMenu('dashboard', '/teste', 'Test', "<i class='fa fa-dashboard'></i>", ['class' => 'nav-link']);
|
||||||
|
|
||||||
|
}, -10)->doIgnore();
|
||||||
|
|
||||||
|
RouteCollection::onHttpError('404', function($code){
|
||||||
|
Output::setView(404)->render();
|
||||||
|
});
|
||||||
|
|
||||||
|
RouteCollection::add('get', '/', '\App\Core\Welcome\WelcomeController@welcome');//->middlewareIgnore('auth');
|
||||||
|
RouteCollection::add('get', '/teste', '\App\Core\Welcome\WelcomeController@teste');
|
||||||
//RouteCollection::add('get', '/welcome', 'WellcomeController@welcome');
|
//RouteCollection::add('get', '/welcome', 'WellcomeController@welcome');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Core\Welcome;
|
namespace App\Core\Welcome;
|
||||||
|
|
||||||
use App\Core\Template\Output;
|
use App\Core\Template\Output as Output;
|
||||||
|
|
||||||
class WelcomeController {
|
class WelcomeController {
|
||||||
|
|
||||||
@@ -10,4 +10,8 @@ class WelcomeController {
|
|||||||
Output::render();
|
Output::render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function teste(){
|
||||||
|
echo 'saddsaadsdsa';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
404
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<a href='auth/form' >Adicionar </a>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class='table'>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Id</th>
|
||||||
|
<th>Value</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
{{#list}}
|
||||||
|
<tr class="table-dark" data-id='{{id}}'>
|
||||||
|
<td>{{id}}</td>
|
||||||
|
<td>{{value}}</td>
|
||||||
|
<td>{{description}}</td>
|
||||||
|
<td>
|
||||||
|
<a href="auth/edit"> <i class="fa fa-pencil"></i></a>
|
||||||
|
<a href="auth/purge"> <i class="fa fa-fire"></i></a>
|
||||||
|
<a href="auth/"> <i class="fa fa-plus"></i></a>
|
||||||
|
<a href="auth/destroy"> <i class="fa fa-trash-o"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/list}}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user