Ejemplo n.º 1
0
 public function back()
 {
     $app = App::instance();
     if (Str::startsWith($app->request->referrer, 'http://localhost-router/')) {
         header("Location: " . $this->request->referrer);
         exit;
     }
     header("Location: http://localhost-router/");
     exit;
 }
Ejemplo n.º 2
0
<?php

use Core\App;
$router = App::instance()->router;
$router->get('/', 'Action\\GetHome');
$router->post('/', 'Action\\GetHome');
$router->get('/test', 'Action\\GetTest');
Ejemplo n.º 3
0
<?php

use Core\App;
require '../vendor/autoload.php';
require '../src/Router/routes.php';
$app = App::instance();
$app->run();