mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
44 lines
984 B
PHP
Executable File
44 lines
984 B
PHP
Executable File
<?php
|
|
|
|
namespace Crater\Http\Controllers\V1\Onboarding;
|
|
|
|
use Crater\Space\RequirementsChecker;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Crater\Http\Controllers\Controller;
|
|
|
|
class RequirementsController extends Controller
|
|
{
|
|
/**
|
|
* @var RequirementsChecker
|
|
*/
|
|
protected $requirements;
|
|
|
|
/**
|
|
* @param RequirementsChecker $checker
|
|
*/
|
|
public function __construct(RequirementsChecker $checker)
|
|
{
|
|
$this->requirements = $checker;
|
|
}
|
|
|
|
/**
|
|
* Display the requirements page.
|
|
*
|
|
* @return JsonResponse
|
|
*/
|
|
public function requirements()
|
|
{
|
|
$phpSupportInfo = $this->requirements->checkPHPversion(
|
|
config('installer.core.minPhpVersion')
|
|
);
|
|
$requirements = $this->requirements->check(
|
|
config('installer.requirements')
|
|
);
|
|
|
|
return response()->json([
|
|
'phpSupportInfo' => $phpSupportInfo,
|
|
'requirements' => $requirements
|
|
]);
|
|
}
|
|
}
|