Closed amine8ghandi8amine closed 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();
Hi @amine8ghandi8amine
Sorry, i dont understand you. What's the problem exactly?
i dont know when to write some things
like those basic things
use Nestable\NestableTrait;
class Category extends \Eloquent {
} Note: $parent variable refers to the parent category (Default parent_id) <?php
$categories = Category::nested()->get();