chimerarocks / l5-yaml-schema
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/chimerarocks/l5-yaml-schema
Requires
- illuminate/support: ^5.3
- prettus/l5-repository: ^2.6
Requires (Dev)
- phpunit/phpunit: ^5.7
README
#l5-yaml-schema
#Installation ###1. Install package
composer require chimerarocks/l5-yaml-schema
###2. Add provider
#####in config/app.php
'providers' => [ ... ChimeraRocks\YamlSchema\Providers\YamlSchemaServiceProvider::class, ],
###3. Publish config file and resources
php artisan vendor:publish
###4. Create schemas at properly dir, specified in config.repository.schemaPath
#the entity name
User:
fields:
name:
#type based on Eloquent types
type: string
#create relationships
hasOne:
entity: [Car,Job]
belongsTo:
entity: Family
Family:
fields:
name:
type: string
address:
type: string
length: 255
hasMany:
entity: User