Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
58f69fdf
Commit
58f69fdf
authored
Apr 19, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing some issues related to environment.
parent
4440412f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
config.php
laravel/config.php
+2
-2
core.php
laravel/core.php
+1
-1
request.php
laravel/request.php
+11
-0
No files found.
laravel/config.php
View file @
58f69fdf
...
...
@@ -226,9 +226,9 @@ class Config {
// Configuration files can be made specific for a given environment. If an
// environment has been set, we will merge the environment configuration
// in last, so that it overrides all other options.
if
(
isset
(
$_SERVER
[
'LARAVEL_ENV'
]
))
if
(
!
is_null
(
Request
::
env
()
))
{
$paths
[]
=
$paths
[
count
(
$paths
)
-
1
]
.
$_SERVER
[
'LARAVEL_ENV'
]
.
'/'
;
$paths
[]
=
$paths
[
count
(
$paths
)
-
1
]
.
Request
::
env
()
.
'/'
;
}
return
$paths
;
...
...
laravel/core.php
View file @
58f69fdf
...
...
@@ -187,7 +187,7 @@ else
if
(
!
is_null
(
$environment
))
{
Request
::
foundation
()
->
server
->
set
(
'LARAVEL_ENV'
,
$environment
);
Request
::
set_env
(
$environment
);
}
/*
...
...
laravel/request.php
View file @
58f69fdf
...
...
@@ -197,6 +197,17 @@ class Request {
return
static
::
foundation
()
->
server
->
get
(
'LARAVEL_ENV'
);
}
/**
* Set the Laravel environment for the current request.
*
* @param string $env
* @return void
*/
public
static
function
set_env
(
$env
)
{
static
::
foundation
()
->
server
->
set
(
'LARAVEL_ENV'
,
$env
);
}
/**
* Determine the current request environment.
*
...
...
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