Download the PHP package skotner/laravel-meta without Composer
On this page you can find all versions of the php package skotner/laravel-meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-meta
Create meta tags on all Laravel models
The skoTner/laravel-meta
package provides easy to use functions for setting, getting and deleting meta tags on all your Eloquent models.
The Package stores all meta tags in the meta
table, or you can choose custom table if needed.
Here's a demo of how you can use it:
You can also set multiple tags at once:
Documentation
You'll find the documentation on https://github.com/skoTner/laravel-meta.
Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving? Feel free to create an issue on GitHub, I'll try to address it as soon as possible.
If you've found a security issue please mail andreas@skotner.net instead of using the issue tracker.
Installation
You can install the package via composer:
The package will automatically register itself.
You can publish the migration and config with:
Note: The default migration assumes you are using integers for your model IDs. If you are using UUIDs, or some other format, adjust the format of the model_id field in the published migration before continuing.
After publishing the migration you can create the meta
table by running the migrations:
You can optionally change the table name in the config file:
Usage
First, you add the Skotner\Meta\Meta
trait to your model(s):
This allows you to set, get and delete meta tags on the model. To use these functions, it is as easy as:
Set a meta tag
You can either set a single meta tag to a model, or you can assign multiple meta tags in one go:
Get a meta tag
Getting a meta tag is as easy as it can be:
Deleting a meta tag
Changelog
Please see CHANGELOG for more information about recent changes.
Security
If you discover any security related issues, please email andreas@skotner.net instead of using the issue tracker.
Free to use
You're free to use this package, but if it makes it to your production environment we highly appreciate you stating credits to us:
We are: Skotner Gruppen AS - www.skotner.no - Norway
Credits
- All Contributors
License
The MIT License (MIT). Please see License File for more information.