Changes to the Framework
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
<?php
|
||||
|
||||
use RR\Response;
|
||||
use App\Core\Template\Output as Output;
|
||||
use Routes\RouteCollection as RouteCollection;
|
||||
use App\Core\Template\Output as Output;
|
||||
|
||||
RouteCollection::add('GET','/', function(){
|
||||
|
||||
Output::setTemplate('');
|
||||
Output::setView('welcome');
|
||||
Output::addValue('string', Array('welcome' => 'Bem vindo'));
|
||||
Output::addValue('palavrinha', 'Oi');
|
||||
Output::render();
|
||||
});
|
||||
|
||||
RouteCollection::get('/welcome', '\App\Core\Welcome\WelcomeController@welcome');
|
||||
|
||||
RouteCollection::add('get', '/', '\App\Core\Welcome\WelcomeController@welcome');
|
||||
//RouteCollection::add('get', '/welcome', 'WellcomeController@welcome');
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Core\Welcome;
|
||||
|
||||
use RR\Response as R;
|
||||
use App\Core\Template\Output;
|
||||
|
||||
class WelcomeController{
|
||||
class WelcomeController {
|
||||
|
||||
function welcome(){
|
||||
R::json(Array('message' => \Lang::getString('welcome', 'welcome')))->send()->done();
|
||||
function welcome() {
|
||||
Output::render();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
use RR\Response as R;
|
||||
|
||||
class WellcomeController{
|
||||
|
||||
function welcome(){
|
||||
R::json(Array('message' => Lang::getString('welcome', 'welcome')))->send()->done();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user