nickdekruijk/taggable 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固