All Projects → appstract → Laravel Meta

appstract / Laravel Meta

Licence: mit
Metadata for Eloquent model

Projects that are alternatives of or similar to Laravel Meta

Elasticsearch Eloquent
⚡️ Eloquent models for Elasticsearch.
Stars: ✭ 100 (-19.35%)
Mutual labels:  laravel, laravel-package
Laravel Mail Editor
MailEclipse ⚡ Laravel Mailable Editor!
Stars: ✭ 1,714 (+1282.26%)
Mutual labels:  laravel, laravel-package
Laravel Stats
📈 Get insights about your Laravel or Lumen Project
Stars: ✭ 1,386 (+1017.74%)
Mutual labels:  laravel, laravel-package
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-22.58%)
Mutual labels:  laravel, laravel-package
Laravel Geo Routes
GeoLocation restricted routes for Laravel
Stars: ✭ 110 (-11.29%)
Mutual labels:  laravel, laravel-package
Laravel Tracer
Shows the path of each blade file loaded in a template
Stars: ✭ 96 (-22.58%)
Mutual labels:  laravel, laravel-package
Laravel Excel
🚀 Supercharged Excel exports and imports in Laravel
Stars: ✭ 10,417 (+8300.81%)
Mutual labels:  laravel, laravel-package
Laravel Sync Migration
Developer tool helps to sync migrations without refreshing the database
Stars: ✭ 89 (-28.23%)
Mutual labels:  laravel, laravel-package
Laravel Fpdf
Create PDFs with Laravel, provides FPDF version 1.82
Stars: ✭ 108 (-12.9%)
Mutual labels:  laravel, laravel-package
Nova Indicator Field
A colour-coded indicator field for Laravel Nova
Stars: ✭ 108 (-12.9%)
Mutual labels:  laravel, laravel-package
Admin One Laravel Dashboard
Admin One — Free Laravel Dashboard (Bulma Buefy Vue.js SPA)
Stars: ✭ 94 (-24.19%)
Mutual labels:  laravel, laravel-package
Laravel Natural Language
This package makes using the Google Natural API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.
Stars: ✭ 119 (-4.03%)
Mutual labels:  laravel, laravel-package
Dropzone Laravel Image Upload
Laravel 5.2 and Dropzone.js auto image uploads with removal links
Stars: ✭ 92 (-25.81%)
Mutual labels:  laravel, laravel-package
Laravel Google Translate
This package makes using the Google Translate API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.
Stars: ✭ 97 (-21.77%)
Mutual labels:  laravel, laravel-package
Laravel Rest Api
Powerful RestAPI plugin for Laravel
Stars: ✭ 90 (-27.42%)
Mutual labels:  laravel, laravel-package
Laravel Enum
Elegant Enum implementation for Laravel
Stars: ✭ 107 (-13.71%)
Mutual labels:  laravel, laravel-package
Bigbluebutton
Package that provides easily communicate between bigbluebutton server and laravel framework
Stars: ✭ 85 (-31.45%)
Mutual labels:  laravel, laravel-package
Laravel Id Generator
Easy way to generate custom ID from database table in Laravel framework.
Stars: ✭ 88 (-29.03%)
Mutual labels:  laravel, laravel-package
Cray
A Laravel package to help you generate nearly complete CRUD pages like crazy!
Stars: ✭ 108 (-12.9%)
Mutual labels:  laravel, laravel-package
Eye
Eyewitness.io package for Laravel 5 applications
Stars: ✭ 114 (-8.06%)
Mutual labels:  laravel, laravel-package

Laravel Meta

Latest Version on Packagist Total Downloads Software License Build Status

Metadata for your Eloquent model

Installation

You can install the package via composer:

composer require appstract/laravel-meta

Publish, migrate

By running php artisan vendor:publish --provider="Appstract\Meta\MetaServiceProvider" in your project all files for this package will be published. For this package, it's only a migration. Run php artisan migrate to migrate the table. There will now be a table named metas in your database.

Usage

You can easily add Meta to an Eloquent model. Just add this to your model:

use Appstract\Meta\Metable;

class Book extends Model
{
    use Metable;
}

Then you can get, add, update and delete meta to the model.

$book = Book::find(1);

$book->addMeta('someKey', 'someValue');

$book->getMeta('someKey');

$book->getMetaValue('someKey');

$book->hasMeta('someKey');

$book->updateMeta('someKey', 'anotherValue');

$book->addOrUpdateMeta('someKey', 'someValue');

$book->deleteMeta('someKey');

$book->getAllMeta();

$book->deleteAllMeta();

Testing

$ composer test

Contributing

Contributions are welcome, thanks to y'all :)

About Appstract

Appstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].