{"repo":"spatie/laravel-route-attributes","free":true,"listed":false,"github":"https://github.com/spatie/laravel-route-attributes","clone":"git clone https://github.com/spatie/laravel-route-attributes.git","description":"Use PHP 8 attributes to register routes in a Laravel app","language":"PHP","stars":888,"topics":["php","php8","laravel"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Use PHP 8 attributes to register routes in a Laravel app This package provides attributes to automatically register routes. Here's a quick example: This attribute will automatically register this route: Are you a visual learner? In this video you'll get an introduction to PHP 8 attributes and how this laravel-routes-attributes works under the hood. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: You can publish the config file with: This is the contents of the published config file: For controllers outside the applications root namespace directories can also be added using a namespace = path pattern in the directories array. In the following example controllers from Modules\\Admin\\Http\\Controllers will be included. If you are using a directory structure where you co-locate multiple types of files in the same directory and want to be more specific about which files are checked for route attributes, you can use the patterns and not patterns options. For example, if you are co-locating your tests with your controllers you could use the patterns option to only look in controller files, or you could use not pat","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-route-attributes/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}