Giter VIP home page Giter VIP logo

laravel-categories's Introduction

Laravel Categories

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

Comes with

  • Migration for the categories table
  • Category Model (that extends Baum/Node so you can use all the handy methods from this excellent nested set implementation)
  • Seed for building the root nodes, one for each type of hierarchy, specified in your config file
  • Sample FrozenNode/Administrator config file for managing the categories

Installation

Add 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

Administrator

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).

laravel-categories's People

Contributors

mercuryseries avatar neilcrookes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-categories's Issues

Seed - Clas does not exist

When I run

php artisan db:seed --class=Fbf\LaravelCategories\CategoriesTableBase
[ReflectionException]
Class FbfLaravelCategoriesCategoriesTableBase does not exist

I'm missing something here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.