2017 © Pedro Peláez
 

library mahana-hierarchy-laravel

A hierarchy management package

image

jrmadsen67/mahana-hierarchy-laravel

A hierarchy management package

  • Friday, November 20, 2015
  • by jrmadsen67
  • Repository
  • 1 Watchers
  • 4 Stars
  • 18 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Mahana Hierarchy Laravel

Laravel package version of the Mahana Hierarchy module found here: https://github.com/jrmadsen67/mahana-hierarchy, (*1)

A complete description of the functionality is located here: http://www.codebyjeff.com/blog/2012/10/nested-data-with-mahana-hierarchy-library, (*2)

Installation

Available (recommended) via composer:, (*3)

"require": {
     "jrmadsen67/mahana-hierarchy-laravel": "dev-master"
}

In you Laravel app.php file add this to providers:, (*4)

'Jrmadsen67\MahanaHierarchyLaravel\MahanaHierarchyLaravelServiceProvider'

and this to your facades (optional):, (*5)

 'MahanaHierarchy'    => 'Jrmadsen67\MahanaHierarchyLaravel\Facades\HierarchyFacade'

then run the migration:, (*6)

php artisan migrate --package="jrmadsen67/mahana-hierarchy-laravel"

You may run these line to check that the installation is correct:, (*7)

$data = ['name' => 'A parent', 'parent_id' => 0 ];
$insert = MahanaHierarchy::insert($data);
$row = MahanaHierarchy::get($insert->id);

A data seeder for experimenting and testing is coming soon., (*8)

Configuration

Table name and fields are completely configurable to your needs. Simply publish the package with the following:, (*9)

php artisan config:publish jrmadsen67/mahana-hierarchy-laravel

IMPORTANT! If you wish to use the included migration, run the publish config line BEFORE the migration and your new table name and fields will be used., (*10)

Differences in this release

Aside from being a Laravel package, I have not yet fully set up the configuration to allow multiple instances and to easily change all the tabel and field names. This is coming very shortly (the main library is already set up this way, but supporting classes are not)., (*11)

Testing

This is fully tested, but proper Unit Testing is not yet included until done a little more...er, "properly"., (*12)

The Versions

20/11 2015

dev-master

9999999-dev

A hierarchy management package

  Sources   Download

The Requires

 

The Development Requires

laravel hierarchy