<?php

namespace App\Console\Commands;

use App\App;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Imperium\File\File;

class Venus extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'app:secure';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Configure app';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $db = database_path('venus');
        if (!File::exist($db))
        {
            if (File::create($db))
            {
                File::copy('.env.example', '.env');
                Artisan::call('key:generate');


            }
        }
        return App::cryptEnv();
	
    }
}
