Skip to content

Commit f8908ff

Browse files
author
Jim Hollington
committed
Fix usesSoftDelete method
The usesSoftDelete method fails because the withTrashed method does not exist. Look for the bootSoftDeletes method instead.
1 parent 5a12c71 commit f8908ff

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/NodeTrait.php

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static function usesSoftDelete()
130130
if (is_null($softDelete)) {
131131
$instance = new static;
132132

133-
return $softDelete = method_exists($instance, 'withTrashed');
133+
return $softDelete = method_exists($instance, 'bootSoftDeletes');
134134
}
135135

136136
return $softDelete;
@@ -287,29 +287,6 @@ public function siblings()
287287
->where($this->getParentIdName(), '=', $this->getParentId());
288288
}
289289

290-
/**
291-
* Get the node siblings and the node itself.
292-
*
293-
* @return \Kalnoy\Nestedset\QueryBuilder
294-
*/
295-
public function siblingsAndSelf()
296-
{
297-
return $this->newScopedQuery()
298-
->where($this->getParentIdName(), '=', $this->getParentId());
299-
}
300-
301-
/**
302-
* Get query for the node siblings and the node itself.
303-
*
304-
* @param array $columns
305-
*
306-
* @return \Illuminate\Database\Eloquent\Collection
307-
*/
308-
public function getSiblingsAndSelf(array $columns = [ '*' ])
309-
{
310-
return $this->siblingsAndSelf()->get($columns);
311-
}
312-
313290
/**
314291
* Get query for siblings after the node.
315292
*

0 commit comments

Comments
 (0)