Skip to content

Instantly share code, notes, and snippets.

@ribafs
Created December 8, 2019 19:40
Show Gist options
  • Save ribafs/3d02e39aeba881741a903ec4b981b242 to your computer and use it in GitHub Desktop.
Save ribafs/3d02e39aeba881741a903ec4b981b242 to your computer and use it in GitHub Desktop.
De dentro do diretório public
<?php
require_once '../vendor/autoload.php';
use \PlugRoute\PlugRoute;
use \PlugRoute\RouteContainer;
use \PlugRoute\Http\RequestCreator;
$route = new PlugRoute (new RouteContainer(), RequestCreator::create());
//$route::get( route: '/', function(){
$route->get('/', function(){
echo 'basic route';
});
$route->on();
O erro agora:
Fatal error: Uncaught Exception: The route could not be found. in /var/www/html/pdoproject/vendor/erandir/plug-route/src/Error.php on line 9
( ! ) Exception: The route could not be found. in /var/www/html/pdoproject/vendor/erandir/plug-route/src/Error.php on line 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment