PHPackages                             m3assy/laravelannotation - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. m3assy/laravelannotation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

m3assy/laravelannotation
========================

1.6(5y ago)121153[3 PRs](https://github.com/3assy2018/laravel-middleware-annotations/pulls)MITPHP

Since Mar 19Pushed 3y ago2 watchersCompare

[ Source](https://github.com/3assy2018/laravel-middleware-annotations)[ Packagist](https://packagist.org/packages/m3assy/laravelannotation)[ RSS](/packages/m3assy-laravelannotation/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (7)Versions (21)Used By (0)

Laravel Middleware Annotations
==============================

[](#laravel-middleware-annotations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cad9628e099bbda28702f271a8aecb9daec8116461fd3c9a8eef03971c7684ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d33617373792f6c61726176656c616e6e6f746174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m3assy/laravelannotation)[![Total Downloads](https://camo.githubusercontent.com/498dfe7ffea7b64aa5fcc136cde76d89325461c78ad06b2f8d595308106040c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d33617373792f6c61726176656c616e6e6f746174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m3assy/laravelannotation)[![Build Status](https://camo.githubusercontent.com/4972e1d641105a3788c4007b2622642a1fe7ebe10f83a0ec1e3f854542223738/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d33617373792f6c61726176656c616e6e6f746174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/m3assy/laravelannotation)

Documantation
-------------

[](#documantation)

- [Installation](#installation)
- [Usage](#usage)
- [Middleware Annotations](#middleware_annotations)
- [Integration With Laratrust](#laratrust_integration)
- [Future Features](#future_features)

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

[](#installation)

Via Composer

```
$ composer require m3assy/laravelannotation
```

If you are developing your application using Laravel 5.5+, the service providers and facades are registered automatically. If you are using lower versions add those lines to config/app.php

```
'providers' => [
    // Service Providers
    M3assy\LaravelAnnotations\LaravelAnnotationServiceProvider::class,
],
'aliases' => [
    // Facade Aliases
    'Annotation' => M3assy\LaravelAnnotations\Facades\Annotation::class,
],
```

Usage
-----

[](#usage)

Now, You don't need to add any trait, the package register a custom controller dispatcher which register middlewares under the hood

Example:

```
