Exemplo n.º 1
0
Arquivo: App.php Projeto: sectorr/core
 /**
  * Boot Sectorr application.
  */
 public function boot()
 {
     session_start();
     $this->registerWhoops();
     $route = empty($_REQUEST['_']) ? '/' : htmlspecialchars($_REQUEST['_']);
     require_once PATH . '/app/routes.php';
     return Route::execute($route);
 }
Exemplo n.º 2
0
 /**
  * Helper: Returns the url of a route.
  *
  * @param $route
  * @return mixed
  */
 function route($route, $properties = [])
 {
     return Route::findRoute($route, $properties);
 }
Exemplo n.º 3
0
<?php

/*
 * --------------------------------------------
 *      Sectorr routing.
 * --------------------------------------------
 */
use Sectorr\Core\Http\Route;
Route::get('/', ['as' => 'home', 'uses' => 'WelcomeController@index']);