{"id":36254275,"url":"https://github.com/mojtabaahn/laravel-controller-aware-routes","last_synced_at":"2026-01-11T07:04:36.593Z","repository":{"id":57019155,"uuid":"288420646","full_name":"mojtabaahn/laravel-controller-aware-routes","owner":"mojtabaahn","description":"Adds Controller-Aware Routes To Laravel","archived":false,"fork":false,"pushed_at":"2020-09-08T18:51:17.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T15:28:25.102Z","etag":null,"topics":["laravel"],"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/mojtabaahn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-18T10:07:44.000Z","updated_at":"2021-11-08T09:48:44.000Z","dependencies_parsed_at":"2022-08-22T20:31:08.205Z","dependency_job_id":null,"html_url":"https://github.com/mojtabaahn/laravel-controller-aware-routes","commit_stats":null,"previous_names":["jsqtalent/laravel-controller-aware-routes"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mojtabaahn/laravel-controller-aware-routes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Flaravel-controller-aware-routes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Flaravel-controller-aware-routes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Flaravel-controller-aware-routes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Flaravel-controller-aware-routes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mojtabaahn","download_url":"https://codeload.github.com/mojtabaahn/laravel-controller-aware-routes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojtabaahn%2Flaravel-controller-aware-routes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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"],"created_at":"2026-01-11T07:04:35.939Z","updated_at":"2026-01-11T07:04:36.587Z","avatar_url":"https://github.com/mojtabaahn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Controller Aware Routes\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/mojtabaahn/laravel-controller-routes.svg?style=flat-square)](https://packagist.org/packages/mojtabaahn/laravel-controller-routes)\n[![Total Downloads](https://img.shields.io/packagist/dt/mojtabaahn/laravel-controller-routes?style=flat-square)](https://packagist.org/packages/mojtabaahn/laravel-controller-routes)\n[![Repo Size](https://img.shields.io/github/repo-size/mojtabaahn/laravel-controller-routes?style=flat-square)](https://packagist.org/packages/mojtabaahn/laravel-controller-routes)\n[![Repo Size](https://img.shields.io/packagist/l/mojtabaahn/laravel-controller-routes?style=flat-square)](https://packagist.org/packages/mojtabaahn/laravel-controller-routes)\n\n## Requirement\nThis package requires **PHP 7.4** or higher.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require mojtabaahn/laravel-controller-routes\n```\n\n## Usage\n\n``` php\n\u003c?php\n// routes/web.php\n\nuse MojtabaaHN\\LaravelControllerRoutes\\Routes;\nuse Illuminate\\Support\\Facades\\Route;\n\n\nRoutes::make('UserController')-\u003emethods(function (ControllerAwareRouter $router) {\n    $router-\u003eget('user/{user}', 'profile')-\u003ename('user.profile');\n    $router-\u003eget('user/{user}/post/{post}','post')-\u003ename('user.post');\n});\n\n// Or\n\nRoutes::make()\n    -\u003econtroller('UserController')\n    -\u003emethods(function (ControllerAwareRouter $router) {\n        $router-\u003eget('user/{user}', 'profile')-\u003ename('user.profile');\n        $router-\u003eget('user/{user}/post/{post}','post')-\u003ename('user.post');\n    });\n\n// Same as\n\nRoute::get('user/{user}', 'UserController@profile')-\u003ename('user.profile');\nRoute::get('user/{user}/post/{post}','UserController@posts')-\u003ename('user.posts');\n\n// Using RouteRegistrar methods\n\nRoutes::make()\n    -\u003eprefix('user/{user}')\n    -\u003ename('user.')\n    -\u003emiddleware('web')\n    -\u003econtroller('UserController')\n    -\u003emethods(function (ControllerAwareRouter $router) {\n        $router-\u003eget('/', 'profile')-\u003ename('profile');\n        $router-\u003eget('posts','posts')-\u003ename('posts');\n    });\n\n// same as \n\nRoute::prefix('user/{user}')\n    -\u003ename('user.')\n    -\u003emiddleware('web')\n    -\u003egroup(function(){\n        Route::get('/', 'UserController@profile')-\u003ename('profile');\n        Route::get('posts','UserController@posts')-\u003ename('posts');\n    });\n\n```\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaahn%2Flaravel-controller-aware-routes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmojtabaahn%2Flaravel-controller-aware-routes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojtabaahn%2Flaravel-controller-aware-routes/lists"}