home
/
zktecojo
/
public_html
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Config
➕ New
📤 Upload
✎ Editing:
FileEnvironmentVariablesLoader.php
← Back
<?php namespace Illuminate\Config; use Illuminate\Filesystem\Filesystem; class FileEnvironmentVariablesLoader implements EnvironmentVariablesLoaderInterface { /** * The filesystem instance. * * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * The path to the configuration files. * * @var string */ protected $path; /** * Create a new file environment loader instance. * * @param \Illuminate\Filesystem\Filesystem $files * @param string $path * @return void */ public function __construct(Filesystem $files, $path = null) { $this->files = $files; $this->path = $path ?: base_path(); } /** * Load the environment variables for the given environment. * * @param string $environment * @return array */ public function load($environment = null) { if ($environment == 'production') $environment = null; if ( ! $this->files->exists($path = $this->getFile($environment))) { return array(); } return array_dot($this->files->getRequire($path)); } /** * Get the file for the given environment. * * @param string $environment * @return string */ protected function getFile($environment) { if ($environment) { return $this->path.'/.env.'.$environment.'.php'; } return $this->path.'/.env.php'; } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel