Files
lucent-laravel/src/Setup/Step/StorageSetupStep.php
T
2024-09-06 23:30:12 +03:00

42 lines
904 B
PHP

<?php
namespace Lucent\Setup\Step;
use Lucent\Setup\Data\SetupStep;
class StorageSetupStep implements IStep
{
public function __invoke(): SetupStep
{
$storage = config("filesystems.disks.lucent");
$name = "Storage setup";
$instructions = <<<EOD
# You can use your local filesystem or s3 compatible storage. Lucent expects you to have a valid configuration inside config/filesystems.php
# example:
return [
'disks' => [
'lucent' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => true,
],
],
];
EOD;
return match (!empty($storage)) {
true => SetupStep::makeSuccess($name, $instructions),
false => SetupStep::makeFail($name, $instructions),
};
}
}