for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelZero\Framework\Commands\Component\Vlucas\Phpdotenv;
use Illuminate\Support\Facades\File;
use LaravelZero\Framework\Commands\Component\Installer as BaseInstaller;
use LaravelZero\Framework\Contracts\Commands\Component\Installer as InstallerContract;
/**
* This is the Laravel Zero Framework vlucas/phpdotent install class.
*
* @author Nuno Maduro <[email protected]>
*/
class Installer extends BaseInstaller implements InstallerContract
{
* {@inheritdoc}
protected $name = 'install:dotenv';
protected $description = 'Installs vlucas/phpdotenv';
public function getComponentName(): string
return 'dotenv';
}
public function install(): bool
$this->require('vlucas/phpdotenv');
$this->task(
'Creating .env and .env.example',
function () {
if (! File::exists(base_path('.env'))) {
File::put(base_path('.env'), 'CONSUMER_KEY=');
if (! File::exists(base_path('.env.example'))) {
File::put(base_path('.env.example'), 'CONSUMER_KEY=');
return true;
);