2017 © Pedro Peláez
 

library model-annotation

image

qsun/model-annotation

  • Wednesday, February 10, 2016
  • by qsun
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,994 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

Model Annotation for Laravel 5

ModelAnnotation puts database schema aside with your model files for easy reference., (*1)

Add annotation to plain Laravel model files, (*2)

<?php
/* MODEL ANNOTATION:
@property   $id                      Type: bigint(20) unsigned      Extra: auto_increment      Default: null      Key: PRI
@property   $name                    Type: varchar(255)             Extra:                     Default: null      Key: nil
@property   $email                   Type: varchar(255)             Extra:                     Default: null      Key: UNI
@property   $email_verified_at       Type: timestamp                Extra:                     Default: null      Key: nil
@property   $password                Type: varchar(255)             Extra:                     Default: null      Key: nil
@property   $remember_token          Type: varchar(100)             Extra:                     Default: null      Key: nil
@property   $created_at              Type: timestamp                Extra:                     Default: null      Key: nil
@property   $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., (*3)

  • Make sure you have backup or VCS., (*4)

  • Modify composer.json file, include following line for require section:, (*5)

"require": {
    ...
    "qsun/model-annotation": "dev-master"
}
  • Run composer update to install newly added package, (*6)

  • Add Service Provider in app.php:, (*7)

'providers' => [
    ....
    qsun\ModelAnnotation\AnnotationServiceProvider::class
]
  • Run php artisan annotate:models to annotate model files

The Versions

10/02 2016

dev-master

9999999-dev

  Sources   Download

LGPL

The Requires

 

by Avatar qsun

09/02 2016

dev-phpdoc

dev-phpdoc

  Sources   Download

LGPL

The Requires

 

by Avatar qsun