master_template/app/Http/Controllers/Installer/FinalController.php

33 lines
1.1 KiB
PHP
Raw Normal View History

2024-06-11 06:31:24 +00:00
<?php
namespace App\Http\Controllers\Installer;
use Illuminate\Routing\Controller;
use App\Events\LaravelInstallerFinished;
use App\Helpers\Installer\EnvironmentManager;
use App\Helpers\Installer\FinalInstallManager;
use App\Helpers\Installer\InstalledFileManager;
class FinalController extends Controller
{
/**
* Update installed file and display finished view.
*
* @param \App\Helpers\Installer\InstalledFileManager $fileManager
* @param \App\Helpers\Installer\FinalInstallManager $finalInstall
* @param \App\Helpers\Installer\EnvironmentManager $environment
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function finish(InstalledFileManager $fileManager, FinalInstallManager $finalInstall, EnvironmentManager $environment)
{
$finalMessages = $finalInstall->runFinal();
$finalStatusMessage = $fileManager->update();
$finalEnvFile = $environment->getEnvContent();
event(new LaravelInstallerFinished);
return view('vendor.installer.finished', compact('finalMessages', 'finalStatusMessage', 'finalEnvFile'));
}
}