namespace BookStack\Settings;
use BookStack\Activity\ActivityType;
+use BookStack\App\AppVersion;
use BookStack\Entities\Tools\TrashCan;
use BookStack\Http\Controller;
use BookStack\References\ReferenceStore;
/**
* Show the page for application maintenance.
*/
- public function index()
+ public function index(TrashCan $trashCan)
{
$this->checkPermission('settings-manage');
$this->setPageTitle(trans('settings.maint'));
- // Get application version
- $version = trim(file_get_contents(base_path('version')));
-
// Recycle bin details
- $recycleStats = (new TrashCan())->getTrashedCounts();
+ $recycleStats = $trashCan->getTrashedCounts();
return view('settings.maintenance', [
- 'version' => $version,
+ 'version' => AppVersion::get(),
'recycleStats' => $recycleStats,
]);
}