serafim/laravel-annotations

Laravel 注解桥接器

1.0.6 2017-12-09 17:00 UTC

This package is auto-updated.

Last update: 2024-09-07 15:23:06 UTC


README

这是一个 Laravel 5+ 的 Doctrine 注解桥接器

安装

composer require serafim/laravel-annotations

app.php 中添加

'providers' => [
    ...
    \Serafim\Annotations\LaravelServiceProvider::class,
]

如果您想配置默认行为,运行 php artisan vendor:publish

用法

use octrine\Common\Annotations\Reader;

app(Reader::class)->getClassAnnotations($reflection); 
// or app('annotations')->..

注意:有关注解的更多信息,请参阅: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/annotations.html