cyberdracula / swagger-model-annotation
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/cyberdracula/swagger-model-annotation
Requires
- php: >=5.3.2
- doctrine/annotations: *
- laravel/framework: >=5.2.0
This package is auto-updated.
Last update: 2025-12-21 04:23:12 UTC
README
ModelAnnotation puts database schema aside with your model files for easy reference.
Add annotation to plain Laravel model files
<?php
/* MODEL ANNOTATION:
@property int $id Type: int(10) unsigned, Extra: auto_increment, Default: null, Key: PRI
@property string $name Type: varchar(255), Extra: , Default: null, Key: nil
@property string $email Type: varchar(255), Extra: , Default: null, Key: UNI
@property string $password Type: varchar(60), Extra: , Default: null, Key: nil
@property string|null $remember_token Type: varchar(100), Extra: , Default: null, Key: nil
@property int|null $created_at Type: timestamp, Extra: , Default: null, Key: nil
@property int|null $updated_at Type: timestamp, Extra: , Default: null, Key: nil
END MODEL ANNOTATION */
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
/**
Usage
This package only works with MySQL for now.
-
Make sure you have backup or VCS.
-
Modify composer.json file, include following line for
requiresection:
"require": {
...
"qsun/model-annotation": "dev-master"
}
-
Run
composer updateto install newly added package -
Add
Service Providerinapp.php:
'providers' => [
....
qsun\ModelAnnotation\AnnotationServiceProvider::class
]
- Run
php artisan annotate:modelsto annotate model files