Package Data | |
---|---|
Maintainer Username: | neilcrookes |
Maintainer Contact: | neil.crookes@fivebyfiveuk.com (Neil Crookes) |
Package Create Date: | 2014-02-26 |
Package Last Update: | 2014-05-18 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-11 15:06:20 |
Package Statistics | |
---|---|
Total Downloads: | 576 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 16 |
Total Watchers: | 4 |
Total Forks: | 7 |
Total Open Issues: | 2 |
A Laravel 4 package for adding one or more types of category hierarchies to a website
e.g. a hierarchy for blog categories and another for product categories
categories
tableAdd the following to you composer.json file (Recommend swapping "dev-master" for the latest release)
"fbf/laravel-categories": "dev-master"
Run
composer update
Add the following to app/config/app.php
'Fbf\LaravelCategories\LaravelCategoriesServiceProvider'
Publish the config
php artisan config:publish fbf/laravel-categories
Run the migration
php artisan migrate --package="fbf/laravel-categories"
Ensure the categories types
are set correctly in the config file.
Run the seed (this will create root nodes for each of your category types
)
php artisan db:seed --class="Fbf\LaravelCategories\CategoriesTableBaseSeeder"
Build your menus in the database, or if you are using FrozenNode's Laravel Administrator, see the info below
You can use the excellent Laravel Administrator package by FrozenNode to administer your categories.
http://administrator.frozennode.com/docs/installation
A ready-to-use model config file for the Category
model (categories.php
), including custom actions to reorder nodes in
the hierarchy, is provided in the src/config/administrator
directory of the package, which you can copy into the
app/config/administrator
directory (or whatever you set as the model_config_path
in the administrator config file).