承接 namest/taxonomy 相关项目开发

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

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

namest/taxonomy

最新稳定版本:v0.2

Composer 安装命令:

composer require namest/taxonomy

包简介

README 文档

README

Provide an elegant way to interact with taxonomies (tags, category, ...) in your Laravel app.

Note: The package is only support Laravel 5

Installation

Step 1: Install package

composer require namest/taxonomy

Step 2: Register service provider in your config/app.php

return [
    ...
    'providers' => [
        ...
        'Namest\Taxonomy\TaxonomyServiceProvider',
    ],
    ...
];

Step 3: Publish package migrations. Open your terminal and type:

php artisan vendor:publish --provider="Namest\Taxonomy\TaxonomyServiceProvider"

Step 4: Migrate the migration that have been published

php artisan migrate

Step 5: Create taxonomies in your terminal by artisan command

php artisan make:taxonomy Color

This command will create a taxonomy in database and make the Color model in app/Color.php to reflect that taxonomy.

Step 6: Read API below and start happy

API

$tag = new Tag;
$tag->name = 'new tag';
$tag->slug = 'new-tag';
$tag->save();

$childTag = new Tag;
$childTag->name = 'child tag';
$childTag->slug = 'child-tag';

$childTag = $tag->childs->save($childTag);
$parent = $childTag->parent;
$tag = Tag::first();
echo $tag->name;
echo $tag->slug;

$childs = $tag->childs;
// Find tag has slug is 'new-tag'
$tag = Tag::hasSlug('new-tag')->first();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固