{"repo":"rinvex/laravel-categories","free":true,"listed":false,"github":"https://github.com/rinvex/laravel-categories","clone":"git clone https://github.com/rinvex/laravel-categories.git","description":"Rinvex Categorizable is a polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.","language":"PHP","stars":466,"topics":["php","laravel","categories","taxonomy","classification"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Rinvex Categories Rinvex Categories is a polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets , and the awesomeness of Sluggable , and Translatable models out of the box. Installation 1. Install the package via composer: 2. Publish resources (migrations and config files): 3. Execute migrations via the following command: 4. Done! Usage To add categories support to your eloquent models simply use \\Rinvex\\Categories\\Traits\\Categorizable trait. Manage your categories Your categories are just normal eloquent models, so you can deal with it like so. Nothing special here! Notes: since Rinvex Categories extends and utilizes other awesome packages, checkout the following documentations for further details: - Powerful Nested Sets using kalnoy/nestedset - Automatic Slugging using spatie/laravel-sluggable - Translatable out of the box using spatie/laravel-translatable Manage your categorizable model The API is intutive and very straightforward, so let's give it a quick look: You can attach categories in various ways: Notes: - The attachCategories() method attach the given categories to the model without touching the currently attached categories, while there's the syncCategories() method that can detach any records that's not in the given items, this method takes a second optional boolean parameter that's set detaching flag to true or false . - To detach model categories you can use the detachCategorie","default_branch":null,"files":null,"tree":[],"storefront":"/r/rinvex","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rinvex/laravel-categories/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}