Download the PHP package denis-kisel/nested-categories without Composer

On this page you can find all versions of the php package denis-kisel/nested-categories. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nested-categories

nested-categories

This library provide optimize common usage categories functional, such as: category tree, breadcrumbs, child category items by one sql query

Support for

mysql5.7.22+ laravel php8.0+

Install package

Install via composer

Install or upgrade Category table

If you have not yet category table, install it:

If you have category table already, just upgrade it:
Suppose what your table has fields: id, parent_id

Configure

Add trait NestableCategory to category model

Add path to fillable or set guarded

[Optional]
Add trait AutoRebuildNested to category model for auto rebuild category structure after events: created, updated, deleted. BUT ITS DONT AUTO REBUILD AFTER BATCH OPERATION(see Rebuild Structure).

Background use one query for rebuild all table

Usage

Tree As Array

id parent_id name order
1 NULL Parent 0
2 1 Child1 0
3 1 Child2 1

Breadcrumbs

Backend use one sql query for N nested categories

Leafs/child category items(Nested Products, Posts, Podcasts, etc..)

Input tables: categories(id, parent_id, name), products(id, category_id, name).
Backend use one sql query for nested leafs

Rebuild Structure

After BATCH CRUD operations for rebuild categories structure, need to use rebuild method. Or you can use trait AutoRebuildNested after single operation(see more in Configure)

Background use one query for rebuild all table

Additional Commands

Testing


All versions of nested-categories with dependencies

PHP Build Version
Package Version
Requires denis-kisel/batch-update Version 1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package denis-kisel/nested-categories contains the following files

Loading the files please wait ....