class Item extends Model { protected $with = ['children']; public function children() { $this->hasMany(AppItems::class, 'parent_id', 'id'); } }