I have two PHP files. The first:
<?php
use App\Router as Route;
include "routes.php";
...
The second 'routes.php' file:
<?php
Route::get('/', 'function(){echo "homepage";}');
...
But when I run it I get an error. I have to add: use App\Route as Route
for the Routes.php file to work.
Is there a way to include routes.php
into the first PHP file without adding use App\Route as Route
at the top of the file since its being included in the first file that is importing it? I'm using PHP7.0