Skip to content

Instantly share code, notes, and snippets.

@sanathks
Created October 27, 2016 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanathks/2b89baf5a19e04006647c6fb067a0c18 to your computer and use it in GitHub Desktop.
Save sanathks/2b89baf5a19e04006647c6fb067a0c18 to your computer and use it in GitHub Desktop.
autoload routes
<?php
foreach (new DirectoryIterator(__DIR__.'/'.'Routes') as $file)
{
if (!$file->isDot() && !$file->isDir())
{
require_once __DIR__.'/Routes/'.$file->getFilename();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment