mirror of
https://github.com/grocy/grocy.git
synced 2025-09-19 11:05:50 +00:00
20 lines
449 B
PHP
20 lines
449 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace Grocy\Controllers;
|
||
|
|
||
|
use Grocy\Services\ApplicationService;
|
||
|
use Grocy\Services\DatabaseMigrationService;
|
||
|
|
||
|
class CliController extends BaseController
|
||
|
{
|
||
|
public function RecreateDemo($request, $response, $args)
|
||
|
{
|
||
|
$applicationService = new ApplicationService();
|
||
|
if ($applicationService->IsDemoInstallation())
|
||
|
{
|
||
|
$databaseMigrationService = new DatabaseMigrationService();
|
||
|
$databaseMigrationService->RecreateDemo();
|
||
|
}
|
||
|
}
|
||
|
}
|