PHPackages                             cuneytyuksel/laravelcategorizable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. cuneytyuksel/laravelcategorizable

ActiveLibrary[Database &amp; ORM](/categories/database)

cuneytyuksel/laravelcategorizable
=================================

Implementing Nested-structure Hierarchy Categories system for Eloquent models.

1.0(2y ago)0422MITPHPPHP ^8.0|^8.1|^8.2

Since May 23Pushed 2y agoCompare

[ Source](https://github.com/cuneytyuksel/LaravelCategorizable)[ Packagist](https://packagist.org/packages/cuneytyuksel/laravelcategorizable)[ RSS](/packages/cuneytyuksel-laravelcategorizable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laravel Categorizable Package
=============================

[](#laravel-categorizable-package)

This Package is an implementation of a Nested-set hierarchy structure, which enables you to categorize your Eloquent models in a polymorphic way. just use the trait in the model, and you're good to go. There is also a `Category` model which you can use directly or extend it in your model of choosing.

Requirements
------------

[](#requirements)

- PHP 8+
- Laravel 8+

Installation
------------

[](#installation)

```
composer require alibayat/laravel-categorizable

```

#### Publish and Run the migrations

[](#publish-and-run-the-migrations)

```
php artisan vendor:publish --provider="AliBayat\LaravelCategorizable\CategorizableServiceProvider"

php artisan migrate
```

Laravel Categorizable package will be auto-discovered by Laravel. and if not: register the package in config/app.php providers array manually.

```
'providers' => [
    ...
    \AliBayat\LaravelCategorizable\CategorizableServiceProvider::class,
],
```

#### Setup models - just use the Trait in the Model.

[](#setup-models---just-use-the-trait-in-the-model)

```
