Skip to content

Commit 97ba876

Browse files
committed
Implemented the setenv command
1 parent 8457677 commit 97ba876

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
[![Total Downloads](https://img.shields.io/packagist/dt/rabol/laravel-setup-local-dev.svg?style=flat-square)](https://packagist.org/packages/rabol/laravel-setup-local-dev)
77

88
This is a very simple, but handy package for setting up local Laravel development environment.
9-
This package contins commands to do all the trivial steps you normally do when setting up your local Laravel development environment.
9+
This package contains commands to do all the trivial steps you normally do when setting up your local Laravel development environment.
1010

11+
One can create a .default_vars.env in the users home directory with the common .env variables that one alwasy set e.g. MAIL_HOST=127.0.0.1 for Homestead based development environments.
1112

13+
It is also possible to specify a specific fiel to beuse by using the --file options.
1214
## Installation
1315

1416
You can install the package via composer:
@@ -22,7 +24,11 @@ composer require rabol/laravel-setup-local-dev --dev
2224
``` php
2325
// Usage description here
2426
php artisan setuplocaldev:setenv
25-
php artisan setuplocaldev:commontasks
27+
28+
or
29+
30+
php artisan setuplocaldev:setenv --file=test.env
31+
2632

2733
```
2834

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
],
1818
"require": {
1919
"php": "^7.3|^8.0",
20-
"illuminate/support": "^6.0|^7.0|^8.0"
20+
"illuminate/support": "^6.0|^7.0|^8.0",
21+
"jackiedo/dotenv-editor": "^1.2",
22+
"juliardi/homedir": "^1.0"
2123
},
2224
"require-dev": {
2325
"orchestra/testbench": "^4.0",

src/LaravelSetupLocalDevServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Rabol\LaravelSetupLocalDev;
44

55
use Illuminate\Support\ServiceProvider;
6+
use Rabol\LaravelSetupLocalDev\Console\Commands\SetEnvCommand;
67

78
class LaravelSetupLocalDevServiceProvider extends ServiceProvider
89
{
@@ -40,7 +41,9 @@ public function boot()
4041
], 'lang');*/
4142

4243
// Registering package commands.
43-
// $this->commands([]);
44+
$this->commands([
45+
SetEnvCommand::class,
46+
]);
4447
}
4548
}
4649

0 commit comments

Comments
 (0)