mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
init crater
This commit is contained in:
42
app/Http/Controllers/RequirementsController.php
Executable file
42
app/Http/Controllers/RequirementsController.php
Executable file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Laraspace\Http\Controllers;
|
||||
|
||||
use Laraspace\Space\RequirementsChecker;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
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
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user