Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120827691
DevelConfig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
DevelConfig.php
View Options
<?php
namespace
App\Http\Middleware
;
use
Closure
;
use
Illuminate\Support\Facades\Cache
;
class
DevelConfig
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public
function
handle
(
$request
,
Closure
$next
)
{
// Only in testing/local environment...
if
(
\App
::
environment
(
'local'
))
{
// Pick up config set in Tests\Browser::withConfig
// This wouldn't technically need to be in a middleware,
// but this way we ensure it's propagated during the next request.
if
(
Cache
::
has
(
'duskconfig'
))
{
$configJson
=
Cache
::
get
(
'duskconfig'
);
$configValues
=
json_decode
(
$configJson
,
true
);
if
(!
empty
(
$configValues
))
{
foreach
(
$configValues
as
$key
=>
$value
)
{
\config
([
$key
=>
$value
]);
}
}
}
}
return
$next
(
$request
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 11:16 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18750144
Default Alt Text
DevelConfig.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline