| 1 | <?php namespace Modules\Core\Console\Installers\Writers; |
||
| 6 | class EnvFileWriter |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var Filesystem |
||
| 10 | */ |
||
| 11 | private $finder; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | protected $search = [ |
||
| 17 | "DB_HOST=localhost", |
||
| 18 | "DB_DATABASE=homestead", |
||
| 19 | "DB_USERNAME=homestead", |
||
| 20 | "DB_PASSWORD=secret", |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $template = '.env.example'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $file = '.env'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param Filesystem $finder |
||
| 35 | */ |
||
| 36 | public function __construct(Filesystem $finder) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param $name |
||
| 43 | * @param $username |
||
| 44 | * @param $password |
||
| 45 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
| 46 | */ |
||
| 47 | public function write($name, $username, $password, $host) |
||
| 66 | } |
||
| 67 |