neon / attributable
3.0.0-alpha-6
2024-03-26 16:29 UTC
Requires
- php: ^8.1
- blendbyte/filament-title-with-slug: 1.0.6
- laravel/framework: ^10.0
- neon/model-publishable: ^1.0
- neon/model-uuid: ^1.0
This package is auto-updated.
Last update: 2024-04-26 20:14:21 UTC
README
Handles advanced attibutes related to any kind of models. The reason of this solution is the Neon CMS' best practice: If customer needs an option, like "show this e-mail on the company's page", we can add that e-mail, like an attribute via the admin UI and just handle the variable on template, and then, no programers needed to show anything on the given page.
Requirements
"neon/model-uuid": "^1.0"
Install
Easily install the composer package:
composer require neon/attributable
Then you should install database migrations by:
php artisan vendor:publish --provider=\"Neon\\Attributable\\NeonAttributableServiceProvider\"
Usage
Just use the Trait like othes traits. Don't forget to use the neon/model-uuid
trait too:
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Neon\Attributable\Models\Traits\Attributable; use Neon\Models\Traits\Uuid; class AwesomeModel extends Model { use Attributable; use Uuid; ... }
License
The MIT License (MIT). Please see License File for more information.