master_template/app/Http/Controllers/Installer/FinalController.php
2024-06-11 12:16:24 +05:45

33 lines
1.1 KiB
PHP
Executable File

<?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'));
}
}