Skip to content

Instantly share code, notes, and snippets.

@dammyammy
Created May 5, 2017 15:41
Show Gist options
  • Save dammyammy/dcac815f8b6dd501699fc4da55d47e4e to your computer and use it in GitHub Desktop.
Save dammyammy/dcac815f8b6dd501699fc4da55d47e4e to your computer and use it in GitHub Desktop.
Load Seperated Routes from a folder.
// Load all separated route files within a specific folder
function loadPartialRoutesFromFolder($directory)
{
foreach (File::files(base_path('/routes/' . $directory)) as $file) {
require_once $file;
}
}
loadPartialRoutesFromFolder('web');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment