Repository URL to install this package:
|
Version:
1.0.0 ▾
|
<?php
/**
* Created by PhpStorm.
* User: danilo
* Date: 18/12/15
* Time: 10:58
*/
namespace Modules\Core\Commands\Installers\Scripts;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Modules\Core\Commands\Installers\SetupScript;
class ProtectInstaller implements SetupScript
{
/**
* @var Filesystem
*/
protected $finder;
/**
* @param Filesystem $finder
*/
public function __construct(Filesystem $finder)
{
$this->finder = $finder;
}
/**
* Fire the install script
* @param Command $command
* @return mixed
* @throws Exception
*/
public function fire(Command $command)
{
if ($this->finder->isFile('.env') && !$command->option('force')) {
throw new Exception('Webbing CMS has already been installed. You can already log into your administration. If you need publish theme assets use the command artisan themes:publish. For module commands, use artisan module:(publish, migrate, seed, etc)');
}
}
}