2017 © Pedro Peláez
 

library nestedcategories

A Laravel 5 package for nested categories.

image

delatbabel/nestedcategories

A Laravel 5 package for nested categories.

  • Friday, July 14, 2017
  • by delatbabel
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1,247 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

nestedcategories

StyleCI Latest Stable Version Total Downloads, (*1)

A Laravel 5 package for adding one or more types of category hierarchy to a website., (*2)

e.g. a hierarchy for blog categories and another for product categories, (*3)

This is a Laravel 5 reimplementation of Laravel 4 Categories, (*4)

Comes with

  • Migration for the categories table
  • Category Model (that extends Baum/Node so you can use all the handy methods from this excellent nested set implementation)
  • Seed for building the root nodes, one for each type of hierarchy, specified in your config file

Installation

Add these lines to your composer.json file:, (*5)

    "require": {
        "delatbabel/nestedcategories": "~1.0"
    },

Once that is done, run the composer update command:, (*6)

    composer update

Alternatively just run this command:, (*7)

    composer require delatbabel/nestedcategories

Register Service Provider

After composer update completes, add this line to your config/app.php file in the 'providers' array:, (*8)

    Delatbabel\NestedCategories\NestedCategoriesServiceProvider::class

Publish the Migrations

Publish the migrations, (*9)

    php artisan vendor:publish

Run the migration, (*10)

    php artisan migrate

Ensure the categories types are set correctly in the seeder file. You can initialise this to whatever you like., (*11)

Run the Seeders

Run the seed (this will create root nodes for each of your category types), (*12)

    php artisan db:seed --class="CategoriesTableBaseArraySeeder"

You may prefer to build your own CategoriesTableSeeder class based on the code in CategoriesTableBaseArraySeeder to seed your own initial set of categories., (*13)

Usage

This class relies on the behind-the-scenes capabilities of Baum. For details on the use of that see the README on github or the Baum web site, (*14)

The Versions

14/07 2017

dev-master

9999999-dev

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

17/03 2017

v1.1

1.1.0.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

28/12 2016

v1.0.6

1.0.6.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

27/08 2016

dev-analysis-qvyNEx

dev-analysis-qvyNEx

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

23/02 2016

v1.0.5

1.0.5.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

23/02 2016

v1.0.4

1.0.4.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

23/02 2016

v1.0.3

1.0.3.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

22/02 2016

v1.0.2

1.0.2.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

18/02 2016

v1.0.1

1.0.1.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy

02/02 2016

v1.0

1.0.0.0

A Laravel 5 package for nested categories.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Del

laravel eloquent l5 laravel5 categories heirarchy