PHPackages                             ngmy/laravel.aop - 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. ngmy/laravel.aop

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

ngmy/laravel.aop
================

Laravel.Aop integrates Ray.Aop with Laravel.

0.11.0(3mo ago)384MITPHPPHP ^8.2CI passing

Since Apr 9Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ngmy/Laravel.Aop)[ Packagist](https://packagist.org/packages/ngmy/laravel.aop)[ Docs](https://github.com/ngmy/Laravel.Aop)[ Fund](https://flattr.com/@ngmy)[ GitHub Sponsors](https://github.com/ngmy)[ RSS](/packages/ngmy-laravelaop/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (12)Used By (0)

Laravel.Aop
===========

[](#laravelaop)

[![Latest Stable Version](https://camo.githubusercontent.com/a6f509710a7ef31266e2812f472a50c59f00bc83ee67f68d2c9ff90e04566baa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e676d792f6c61726176656c2e616f702e7376673f7374796c653d666c61742d737175617265266c6162656c3d737461626c65)](https://packagist.org/packages/ngmy/laravel.aop)[![Test Status](https://camo.githubusercontent.com/f78ec87ebd1c7953bb9bd9135fa556b9006b9a502eec400fa5a15091e9fc50f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e676d792f6c61726176656c2e616f702f746573742e796d6c3f7374796c653d666c61742d737175617265266c6162656c3d74657374)](https://github.com/ngmy/Laravel.aop/actions/workflows/test.yml)[![Lint Status](https://camo.githubusercontent.com/fcc2d049fa8e561cc6c8decbf6531cdf24ea1c6160a2d8c24e284eeeea42ae5b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e676d792f6c61726176656c2e616f702f6c696e742e796d6c3f7374796c653d666c61742d737175617265266c6162656c3d6c696e74)](https://github.com/ngmy/Laravel.aop/actions/workflows/lint.yml)[![Code Coverage](https://camo.githubusercontent.com/5df9e9b2567d9b7ff98e5d32734a4d545d6b66fdca4d894819e92006294a39e8/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f6e676d792f4c61726176656c2e416f703f7374796c653d666c61742d737175617265)](https://coveralls.io/github/ngmy/Laravel.Aop)[![Total Downloads](https://camo.githubusercontent.com/d061b27d8baf9472751a6be5643c5ca690426884aace1a76d85f763818d3884c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e676d792f6c61726176656c2e616f702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ngmy/laravel.aop)

Laravel.Aop integrates Ray.Aop with Laravel. It provides fast AOP by static weaving.

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

[](#installation)

First, you should install Laravel.Aop via the Composer package manager:

```
composer require ngmy/laravel.aop
```

You will be asked if you trust the `olvlvl/composer-attribute-collector` package, so you should press `y`.

Next, you should configure the `olvlvl/composer-attribute-collector` package.

Tip

Please see the [composer-attribute-collector documentation](https://github.com/olvlvl/composer-attribute-collector)to learn how to configure the `olvlvl/composer-attribute-collector` package.

Then, you should publish the Laravel.Aop configuration file using the `vendor:publish` Artisan command. This command will publish the `aop.php` configuration file to your application's `config` directory:

```
php artisan vendor:publish --provider="Ngmy\LaravelAop\ServiceProvider"
```

Usage
-----

[](#usage)

First, you should define the attribute. For example, let's define the `Transactional` attribute:

```
