承接 balajidharma/laravel-category 相关项目开发

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

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

balajidharma/laravel-category

最新稳定版本:v2.0.10

Composer 安装命令:

composer require balajidharma/laravel-category

包简介

Laravel nestable custom categories

README 文档

README

Create database-based Category to your Laravel projects.

Total Downloads Latest Stable Version License

Table of Contents

Installation

  • Install the package via composer
composer require balajidharma/laravel-category
  • Publish the migration and the config/category.php config file with
php artisan vendor:publish --provider="BalajiDharma\LaravelCategory\CategoryServiceProvider"
  • Run the migrations
php artisan migrate

Demo

The "Basic Laravel Admin Penel" starter kit come with Laravel Category

Create Category Type

use BalajiDharma\LaravelCategory\Models\CategoryType;

CategoryType::create([
    'name' => 'Product Category',
    'machine_name' => 'product_category',
    'description' => 'Site Product Category',
]);

Category Tree

  • Get a category tree by using category type id
use BalajiDharma\LaravelCategory\Models\Category;

$items = (new Category)->toTree($type->id);
  • Get a category tree by using the category machine name
use BalajiDharma\LaravelCategory\Models\CategoryType;

$items = CategoryType::getCategoryTree('product_category');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-16