Sven\FlexEnv\Env::copy PHP 메소드

copy() 공개 메소드

Copy the .env file to the given destination.
public copy ( string $destination, boolean $excludeValues = false ) : boolean
$destination string Full path to copy the file to
$excludeValues boolean Whether or not to include values
리턴 boolean
    public function copy($destination, $excludeValues = false)
    {
        $env = $this->parseFile();
        //
    }

Usage Example

예제 #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     $env = new Env(base_path('.env'));
     $name = (string) $this->option('name');
     try {
         $env->copy(base_path($name, Env::COPY_FOR_DISTRIBUTION));
         return $this->comment("Successfully created the file [{$name}]");
     } catch (\Exception $e) {
         return $this->error($e->getMessage());
     }
 }