<?php

namespace App\Services;

use Illuminate\Support\Fluent;

class Command extends \LaravelZero\Framework\Commands\Command
{

    protected Fluent $env;

    public function __construct()
    {
        parent::__construct();

        $this->loadProjectEnv();
    }


    public function loadProjectEnv(): void
    {

        $file = getcwd() . '/.env';

        if (!file_exists($file)) {
//            $this->error('No .env file found');
            return;
        }

        $this->env = fluent(parse_ini_file($file));

        config()->set('project.env', $this->env);;
    }

}