Download the PHP package raymondidema/category without Composer
On this page you can find all versions of the php package raymondidema/category. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download raymondidema/category
More information about raymondidema/category
Files in raymondidema/category
Download raymondidema/category
More information about raymondidema/category
Files in raymondidema/category
Vendor raymondidema
Package category
Short Description Category table (POSTGRESQL ONLY)
License MIT
Package category
Short Description Category table (POSTGRESQL ONLY)
License MIT
Keywords postgresqllaravel
Please rate this library. Is it a good library?
Informations about the package category
Category
Category Table (Recursive) (PostgreSQL only)
Installation
composer.json
"require": {
"laravel/framework": "4.1.*",
"raymondidema/category": "dev-master"
},
After updating you could do composer update or composer install
or alternatively composer require raymondidema/category
Config
./app/config/app.php
'providers' => array( 'Raymondidema\Category\CategoryServiceProvider' );
'aliases' => array( 'Menustructure' => 'Raymondidema\Category\Facades\Category' );
Children
Menustructure::table('categories')
->children($id)
->depth(3)
->get();
Optional components
Required
table($table), children($id), childrenWithRoot($id), decendants($id), decendantsWithRoot($id), ancestors($id), breadcrumb($id), get(array('*'))
Optional
depth($integer), where($column, $option), orderBy($column, $ascOrDesc), remember($minutes = null)
Descendants
Menustructure::table('categories')
->decendants($id)
->depth(2)
->where('name', 'aspire')
->get();
Ancestors
Menustructure::table('categories')->ancestors($id)->get(array('name','slug'));
Database layout example
Category requires the following columns: id, parent_id, position
Schema::create('categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('parent_id')->unsigned()->nullable();
$table->string('name');
$table->string('slug');
$table->integer('position')->unsigned()->nullable();
$table->timestamps();
$table->softDeletes();
});
How to interact with a model
this is not required.
<?php
use \Raymondidema\Category\Models\Reloquent;
class Category extends Reloquent
{
// do stuff here!!!
}All versions of category with dependencies
PHP Build Version
Package Version
The package raymondidema/category contains the following files
Loading the files please wait ...