Created
May 5, 2017 15:41
-
-
Save dammyammy/dcac815f8b6dd501699fc4da55d47e4e to your computer and use it in GitHub Desktop.
Load Seperated Routes from a folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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