laravel-nestedset icon indicating copy to clipboard operation
laravel-nestedset copied to clipboard

Effective tree structures in Laravel 4-8

Results 149 laravel-nestedset issues
Sort by recently updated
recently updated
newest added

hi use php 8.1 and when use node trait i can't access parent function it's predefined php class

https://github.com/lazychaser/laravel-nestedset/blob/2d5c99fe1bfbaa4004f8d6fb24475f7ff88bb526/src/QueryBuilder.php#L643C11-L643C14 In line 638 there is function columnPatch(...) ``` protected function columnPatch($col, array $params) { extract($params); /** @var int $height */ if ($height > 0) $height = '+'.$height; ... ```...

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

Hi, I'm having a problem when I try to delete a node with descendants. ``` namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Models\Post\Category; class Post extends Model { use HasFactory;...

Thanks for the awesome thing! I was building my app and found that there were no hints given by my IDE (PhpStrom), I was using `descendantsAndSelf()` method. I've made workaround...

Hi! The practic of extending builder through newEloquentBuilder is becoming more and more common. Package owners and project devs - everybody wants to use their own builders. But since this...

Using a trait for the Eloquent query builder logic allows the developer to combine it with other Eloquent builder customisations, e.g. from other packages. For example, I use my own...

For really big trees (say 100k nodes in 5+ levels), `descendants()` will return all those nodes and will break the application. The subquery added by `withDepth()` is costly the more...