Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Hierarchybundle Laravel Package

cpana/hierarchybundle

View on GitHub
Deep Wiki
Context7

HierarchyBundle

Hierarchy Management with Neo4j and Symfony

This Symfony bundle manages a company hierarchy retrieving and stroring information to a Neo4j database. The hierarchy is based on groups: PHP group is part of Software Developement group, which is part of IT, etc. The users are members of these groups having differend kind of roles (manager, employee etc).

HierarchyBundle comes with a front where regular user can just browse data and an Admin area from where you can create, edit, delete info.

I got the idea for this bundle from the Neo4j documentation: http://neo4j.com/docs/stable/examples-user-roles-in-graphs.html HierarchyBundle is using the Neo4jPHP library https://github.com/jadell/neo4jphp


Installation

Use composer:

composer require cpana/hierarchybundle

Register the bundle in AppKernel:

new CPANA\HierarchyBundle\CPANAHierarchyBundle(),

Add your parameters to app/config/config.yml:

cpana_hierarchy:
	group_hierarchy_manager_neo4j:
		neo4j_user:  'user'
		neo4j_password:  'password'
		def_rel_type_group_to_group: 'PART_OF'
		def_rel_type_user_to_group: 'MEMBER_OF'
		root_group_id: '11111'
		manager_role_property: 'manager'
		default_property_group:  'name'
		default_property_user: 'name'

You need to specify which is the root group node of your hierarchy by prodiving the Neo4j Id of that node in parameter "root_group_id".

Import routes to app/config/routing.yml:

cpana_hierarchy:
	resource: "@CPANAHierarchyBundle/Controller/"
	prefix:   /h
	type:     annotation

Install assets:

php app/console assets:install

In your browser type your project path and add app_dev.php/h/admin/home. If you are using the sample data provided in the Wiki https://github.com/cristianpana86/HierarchyBundle/wiki/Sample-data search for user Peter, you should see something like this:

admin

TO DO:

  1. Write tests
  2. Handle nodes with 2 fathers
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed