{"id":19300051,"url":"https://github.com/kirschbaum-development/laravel-route-file-macro","last_synced_at":"2025-04-22T10:31:21.783Z","repository":{"id":35035129,"uuid":"155291454","full_name":"kirschbaum-development/laravel-route-file-macro","owner":"kirschbaum-development","description":"A macro for Laravel's Router to load route file(s) directly","archived":false,"fork":false,"pushed_at":"2024-02-27T16:25:50.000Z","size":28,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-28T15:20:58.139Z","etag":null,"topics":["laravel","macros","routing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirschbaum-development.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-29T22:47:58.000Z","updated_at":"2022-02-10T15:30:47.000Z","dependencies_parsed_at":"2023-10-05T04:55:00.535Z","dependency_job_id":null,"html_url":"https://github.com/kirschbaum-development/laravel-route-file-macro","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":"0.052631578947368474","last_synced_commit":"5ea23e9af726b948f36addb29e715b073afabf23"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirschbaum-development%2Flaravel-route-file-macro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirschbaum-development%2Flaravel-route-file-macro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirschbaum-development%2Flaravel-route-file-macro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirschbaum-development%2Flaravel-route-file-macro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirschbaum-development","download_url":"https://codeload.github.com/kirschbaum-development/laravel-route-file-macro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223893052,"owners_count":17220834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","macros","routing"],"created_at":"2024-11-09T23:13:32.241Z","updated_at":"2024-11-09T23:13:32.870Z","avatar_url":"https://github.com/kirschbaum-development.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Route File Macro\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/kirschbaum-development/laravel-route-file-macro.svg?style=flat-square)](https://packagist.org/packages/kirschbaum-development/laravel-route-file-macro)\n[![Total Downloads](https://img.shields.io/packagist/dt/kirschbaum-development/laravel-route-file-macro.svg?style=flat-square)](https://packagist.org/packages/kirschbaum-development/laravel-route-file-macro)\n\nThis package allows you to load a routes file directly from the Laravel `Router`.\n\n## Requirements\n\nThis package requires Laravel 5.7 or higher.\n\n__Due to Laravel 7's PHP version requirement, if you need support for PHP 7.1, please use version 0.2 of the package.__\n\n## Installation\n\nYou can install this macro via composer:\n\n```bash\ncomposer require kirschbaum-development/laravel-route-file-macro\n```\n\n## Usage\n\n### Single Item\n\n`Route::file` accepts a single file path or `SplFileInfo` object and cannot be used with multiple paths or file objects.\n\n```php\nRoute::file(base_path('routes/admin/users.php'));\n\n$files = File::files(__DIR__.'/routes');\nRoute::files($files[0]);\n```\n\n### Multiple Items\n\n`Route::files` accepts an array of file paths or an array of `SplFileInfo` objects and cannot be used with a single path or file object.\n\n```php\nRoute::files([\n    base_path('routes/admin/posts.php'),\n    base_path('routes/admin/users.php')\n]);\n\n$files = File::files(__DIR__.'/routes');\nRoute::files($files);\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email david@kirschbaumdevelopment.com or nathan@kirschbaumdevelopment.com instead of using the issue tracker.\n\n## Credits\n\n- [David VanScott](https://github.com/dvanscott)\n- [Justin Seliga](https://github.com/jrseliga)\n\n## Sponsorship\n\nDevelopment of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more [about us](https://kirschbaumdevelopment.com) or [join us](https://careers.kirschbaumdevelopment.com)!\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirschbaum-development%2Flaravel-route-file-macro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirschbaum-development%2Flaravel-route-file-macro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirschbaum-development%2Flaravel-route-file-macro/lists"}