mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 04:26:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			437 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			437 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Traits;
 | 
						|
 | 
						|
use Illuminate\Support\Env;
 | 
						|
use RuntimeException;
 | 
						|
 | 
						|
trait EnvironmentWriterTrait
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Update the .env file for the application using the passed in values.
 | 
						|
     *
 | 
						|
     * @param  array<string, mixed>  $values
 | 
						|
     *
 | 
						|
     * @throws RuntimeException
 | 
						|
     */
 | 
						|
    public function writeToEnvironment(array $values = []): void
 | 
						|
    {
 | 
						|
        Env::writeVariables($values, base_path('.env'), true);
 | 
						|
    }
 | 
						|
}
 |