PHPackages                             ehsanmoradi/categorizable - 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. ehsanmoradi/categorizable

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

ehsanmoradi/categorizable
=========================

Implementing Categories system for Laravel's Eloquent models.

2.1.0(3y ago)08MITPHPPHP ^7.2|^8.0

Since Aug 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ehsan-moradi/laravel-categorizable)[ Packagist](https://packagist.org/packages/ehsanmoradi/categorizable)[ RSS](/packages/ehsanmoradi-categorizable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

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

[](#laravel-categorizable-package)

This Package enables you to Categorize your Eloquent Models. just use the trait in the model and you're good to go.

### Requirements

[](#requirements)

- PHP 7.2+
- Laravel 8+

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

[](#installation)

```
composer require ehsanmoradi/categorizable

```

#### Publish and Run the migrations

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

```
php artisan vendor:publish --provider="EhsanMoradi\Categorizable\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' => [
	...
	\EhsanMoradi\Categorizable\CategorizableServiceProvider::class,
],
```

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

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

```
