<?php namespace BookStack\Http\Controllers;
use BookStack\Actions\ActivityType;
-use BookStack\Entities\Deletion;
-use BookStack\Entities\Managers\TrashCan;
+use BookStack\Entities\Models\Deletion;
+use BookStack\Entities\Tools\TrashCan;
class RecycleBinController extends Controller
{
$this->checkPermission('restrictions-manage-all');
return $next($request);
});
- parent::__construct();
}
{
$deletions = Deletion::query()->with(['deletable', 'deleter'])->paginate(10);
+ $this->setPageTitle(trans('settings.recycle_bin'));
return view('settings.recycle-bin.index', [
'deletions' => $deletions,
]);
{
/** @var Deletion $deletion */
$deletion = Deletion::query()->findOrFail($id);
+ $this->logActivity(ActivityType::RECYCLE_BIN_DESTROY, $deletion);
$deleteCount = (new TrashCan())->destroyFromDeletion($deletion);
- $this->logActivity(ActivityType::RECYCLE_BIN_DESTROY, $deletion);
$this->showSuccessNotification(trans('settings.recycle_bin_destroy_notification', ['count' => $deleteCount]));
return redirect($this->recycleBinBaseUrl);
}