Example #1
0
 public function __construct()
 {
     static::$instance = $this;
     $this->_container = new Collection();
     $this->_container->set('app', $this);
     Route::init($this->_container);
     $this->_loadBaseConfig();
 }
Example #2
0
<?php

use ZigiPhp\Http\Route;
if (!defined('APP_PATH')) {
    exit;
}
Route::get('/[i:id]', function ($id) {
    echo $id;
});
Route::get('/test', 'SampleController@test');
Route::get('/index', 'SampleController@index', null, function () {
    echo 'hey example middleware';
});
Route::before(function () {
    echo 'hey example global middleware<br>';
});