承接 nickdekruijk/taggable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nickdekruijk/taggable

最新稳定版本:1.0.5

Composer 安装命令:

composer require nickdekruijk/taggable

包简介

Make your Laravel models taggable

README 文档

README

Latest Stable Version Latest Unstable Version Monthly Downloads Total Downloads License

Taggable

Make your Laravel models taggable

Installation

composer require nickdekruijk/taggable

Config

If you don't like the default configuration edit config/taggable.php after publishing the config file with:

php artisan vendor:publish --tag=config --provider="NickDeKruijk\Taggable\ServiceProvider"

Run migration

Then run the migration

php artisan migrate

Usage

Add the Taggable trait to your model:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use NickDeKruijk\Taggable\Taggable;

class Product extends Model
{
    use Taggable;

Admin package integration

If you are using nickdekruijk/admin add this to your config/admin.php file to manage tags:

        'tags' => [
            'view' => 'admin::model',
            'icon' => 'fa-tags',
            'model' => 'NickDeKruijk\Taggable\Tag',
            'index' => 'title',
            'active' => 'active',
            'orderBy' => 'sort',
            'sortable' => true,
            'treeview' => 'parent',
            'columns' => [
                'active',
                'title',
            ],
        ],

And add a column to the model you made taggable:

                'tags' => [
                    'type' => 'pivot',
                    'model' => 'NickDeKruijk\Taggable\Tag',
                    'morph' => 'taggable',
                    'scope' => 'getTree',
                    'columns' => 'title',
                    'treeview' => 'parent',
                ],

License

Admin is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 307
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-21