use BookStack\Entities\Managers\TrashCan;
use BookStack\Exceptions\MoveOperationException;
use BookStack\Exceptions\NotFoundException;
-use BookStack\Exceptions\NotifyException;
use Exception;
-use Illuminate\Contracts\Container\BindingResolutionException;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
class ChapterRepo
/**
* ChapterRepo constructor.
- * @param $baseRepo
*/
public function __construct(BaseRepo $baseRepo)
{
public function destroy(Chapter $chapter)
{
$trashCan = new TrashCan();
- $trashCan->destroyChapter($chapter);
+ $trashCan->softDestroyChapter($chapter);
+ $trashCan->autoClearOld();
}
/**