atayahmet / laravel-nestable

Laravel 5 nested category/menu generator
MIT License
214 stars 52 forks source link

i just want a documentation for this bieutifull package #17

Closed amine8ghandi8amine closed 7 years ago

amine8ghandi8amine commented 7 years ago

i dont know when to write some things

like those basic things


use Nestable\NestableTrait;

class Category extends \Eloquent {

use NestableTrait;

protected $parent = 'parent_id';

} Note: $parent variable refers to the parent category (Default parent_id) <?php

$categories = Category::nested()->get();

atayahmet commented 7 years ago

Hi @amine8ghandi8amine

Sorry, i dont understand you. What's the problem exactly?