mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-13 03:31:07 +02: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);
|
|
}
|
|
}
|