Example #1
0
File: App.php Project: 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);
 }
Example #2
0
 /**
  * Helper: Returns the url of a route.
  *
  * @param $route
  * @return mixed
  */
 function route($route, $properties = [])
 {
     return Route::findRoute($route, $properties);
 }
Example #3
0
<?php

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