Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
5a34c60c
Commit
5a34c60c
authored
Oct 08, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify environment loading.
parent
6980d95c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
.gitignore
+1
-1
bootstrap/environment.php
+26
-5
No files found.
.gitignore
View file @
5a34c60c
.env.*
/.idea
/vendor
.env
.DS_Store
Thumbs.db
composer.lock
...
...
bootstrap/environment.php
View file @
5a34c60c
...
...
@@ -2,6 +2,28 @@
/*
|--------------------------------------------------------------------------
| Load Environment Variables
|--------------------------------------------------------------------------
|
| Next we will load the environment variables for the application which
| are stored in the ".env" file. These variables will be loaded into
| the $_ENV and "putenv" facilities of PHP so they stay available.
|
*/
try
{
Dotenv
::
load
(
__DIR__
.
'/../'
);
Dotenv
::
required
(
'APP_ENV'
);
}
catch
(
RuntimeException
$e
)
{
die
(
'Application environment not configured.'
.
PHP_EOL
);
}
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
...
...
@@ -11,8 +33,7 @@
|
*/
$env
=
$app
->
detectEnvironment
([
'local'
=>
[
'homestead'
],
]);
$env
=
$app
->
detectEnvironment
(
function
()
{
return
getenv
(
'APP_ENV'
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment