PHPackages                             smashed-egg/laravel-route-annotation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. smashed-egg/laravel-route-annotation

ActiveLibrary[Framework](/categories/framework)

smashed-egg/laravel-route-annotation
====================================

Adds support for Route Annotations in Laravel

0.8.0(2mo ago)164.8k↓25%MITPHPPHP ^8.0.2CI passing

Since Jan 30Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/smashed-egg/laravel-route-annotation)[ Packagist](https://packagist.org/packages/smashed-egg/laravel-route-annotation)[ RSS](/packages/smashed-egg-laravel-route-annotation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (13)Used By (0)

 [![](https://raw.githubusercontent.com/smashed-egg/.github/05d922c99f1a3bddea88339064534566b941eca9/profile/main.jpg)](https://raw.githubusercontent.com/smashed-egg/.github/05d922c99f1a3bddea88339064534566b941eca9/profile/main.jpg)

Laravel Route Annotation
========================

[](#laravel-route-annotation)

[![Latest Stable Version](https://camo.githubusercontent.com/3f61ac4ffd80ad54341999a4eb315f6d47da81d76c3fc5d2cca32b08958af60f/68747470733a2f2f706f7365722e707567782e6f72672f736d61736865642d6567672f6c61726176656c2d726f7574652d616e6e6f746174696f6e2f762f737461626c65)](https://github.com/smashed-egg/laravel-route-annotation/releases)[![Downloads this Month](https://camo.githubusercontent.com/5281695ce5c2e534a4492e931f12e5c31a8844e1c12f39710e664a612537cf8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f736d61736865642d6567672f6c61726176656c2d726f7574652d616e6e6f746174696f6e2e737667)](https://packagist.org/packages/smashed-egg/laravel-route-annotation)

This package allows you to load routes using PHP Attributes to define routes in your controller classes.

More details to follow.

Requirements
------------

[](#requirements)

- PHP 8.0.2+
- Laravel 9.0+

Installation
------------

[](#installation)

To install this package please run:

```
composer require smashed-egg/laravel-route-annotation

```

[Support Me](https://github.com/sponsors/tomgrohl)
--------------------------------------------------

[](#support-me)

Do you like this package? Does it improve you're development. Consider sponsoring to help with future development.

[Buy me a coffee!](https://github.com/sponsors/tomgrohl)

Thank you!

Usage
-----

[](#usage)

Registering Routes
------------------

[](#registering-routes)

To register routes in your controller, first you have to import the Route annotation class:

```
