laravel-nestedset
laravel-nestedset copied to clipboard
You May Ordered Children with adding this method.
In your model file,
use NodeTrait;
public function ordered_children()
{
return $this->children()->orderBy('_lft');
}
substitute your eager loading children method with method you newly create with defined scope.
Enjoy