Files
lucent-laravel/src/Setup/Step/LucentConfigStep.php
T

32 lines
667 B
PHP
Raw Normal View History

2024-09-06 20:59:56 +03:00
<?php
namespace Lucent\Setup\Step;
use Lucent\Setup\Data\SetupStep;
class LucentConfigStep implements IStep
{
public function __invoke(): SetupStep
{
2024-09-06 23:30:12 +03:00
$lucentConfig = config("lucent.schemas_path");
2024-09-06 20:59:56 +03:00
$name = "Generate Lucent config";
$instructions = <<<EOD
# Run the following command to generate the configuration file:
2024-09-06 23:30:12 +03:00
php artisan vendor:publish --tag=lucent-config
2024-09-06 20:59:56 +03:00
2024-09-06 21:00:15 +03:00
# A lucent.php file will be created in your config folder
2024-09-06 20:59:56 +03:00
EOD;
return match (!empty($lucentConfig)) {
true => SetupStep::makeSuccess($name, $instructions),
false => SetupStep::makeFail($name, $instructions),
};
}
}