Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: digitalmeat/envoy-helper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: freshworkstudio/envoy-helper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Apr 28, 2018

  1. Copy the full SHA
    35e5912 View commit details

Commits on Mar 6, 2019

  1. Update dotenv

    gdespirito committed Mar 6, 2019
    Copy the full SHA
    00ec000 View commit details
Showing with 142 additions and 17 deletions.
  1. +8 −0 README.md
  2. +4 −4 composer.json
  3. +121 −11 composer.lock
  4. +9 −2 src/EnvoyHelper.php
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# envoy-helper

## Installation
`composer require freshwork/envoy-helper`

### Usage
```bash
php vendor/bin/envoy_helper show_env DB_NAME
```
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "meat/envoy-helper",
"description": "Envoy Helper for MEAT projects",
"name": "freshwork/envoy-helper",
"description": "Laravel Envoy helper",
"license": "MIT",
"autoload": {
"psr-4": {
"Meat\\EnvoyHelper\\": "src/"
"Meat\\EnvoyHelper\\": "src/"
}
},
"authors": [
@@ -17,6 +17,6 @@
"envoy_helper"
],
"require": {
"vlucas/phpdotenv": "^2.2"
"vlucas/phpdotenv": "^2.2|^3.3"
}
}
132 changes: 121 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/EnvoyHelper.php
Original file line number Diff line number Diff line change
@@ -2,14 +2,21 @@

namespace Meat\EnvoyHelper;

use Dotenv\Dotenv;

class EnvoyHelper
{
public function loadEnv()
{
$dotenv = new \Dotenv\Dotenv(__DIR__ . '/../../../../');
try {
$dotenv = Dotenv::create(__DIR__ . '/../../../../');
} catch (\Exception $e) {
$dotenv = new \Dotenv\Dotenv(__DIR__ . '/../../../../');
}

try{
$dotenv->load();
} catch (Exception $exception) {
} catch (\Exception $exception) {
echo "No existe archivo .env";
exit (1);
}