Download the PHP package dottwatson/laravel-model-meta without Composer
On this page you can find all versions of the php package dottwatson/laravel-model-meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dottwatson/laravel-model-meta
More information about dottwatson/laravel-model-meta
Files in dottwatson/laravel-model-meta
Package laravel-model-meta
Short Description A fast, configurable and smart tool to manage metat data on your models
License MIT
Informations about the package laravel-model-meta
Laravel Model Meta
Extend your models with unlimited meta attributes
Easly add meta data to your model, without change any logic. This package can gives you the ability to extend your laravel model with a configurable set of meta data. Each meta will be automatically inserted,upadted or deleted, following your model modifications and lifecycle.
Meta data will be treated exactly like attributes, so they can be cast, hidden, and have accessories and mutators available. You don't need to know any new syntax, as it is all manageable with the standard model conventions.
Installation
then publish config files
File config/model-meta-types.php
Here you can set all the available meta types. You can add any kind of meta type for all your needs
Fill free to define all your own meta types
config/model-meta.php
Here you can define all the meta data available on your model.
You can also assign a meta list directly on the model (see below).
Implements meta on your existing model
Define meta directly on the model
For default, the meta data are relationed to the model primary key. For customize it on your needs add this in your model
Commands
This create a preset model under app\Models, and if passed, creates also the table into database
This creates a standalone meta table ready to be used in your model according with the property.
Queries
No modifications are required, No extra methods are implemented. If you use the model builder,each meta will automatically be treated as if it were a column in your table.