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
bee2a273
Commit
bee2a273
authored
Apr 18, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added default option to bundle::option method.
parent
3f2bdb76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
laravel/bundle.php
+8
-2
laravel/documentation/changes.md
+1
-0
No files found.
laravel/bundle.php
View file @
bee2a273
...
...
@@ -422,13 +422,19 @@ class Bundle {
*
* @param string $bundle
* @param string $option
* @param mixed $default
* @return mixed
*/
public
static
function
option
(
$bundle
,
$option
)
public
static
function
option
(
$bundle
,
$option
,
$default
=
null
)
{
$bundle
=
static
::
get
(
$bundle
);
if
(
!
is_null
(
$bundle
))
return
array_get
(
$bundle
,
$option
);
if
(
is_null
(
$bundle
))
{
return
value
(
$default
);
}
return
array_get
(
$bundle
,
$option
,
$default
);
}
/**
...
...
laravel/documentation/changes.md
View file @
bee2a273
...
...
@@ -49,6 +49,7 @@
-
`Request::secure`
now takes
`application.ssl`
configuration option into consideration.
-
Simplified the
`paths.php`
file.
-
Only write file caches if number of minutes is greater than zero.
-
Added
`$default`
parameter to Bundle::option method.
<a
name=
"upgrade-3.2"
></a>
## Upgrading From 3.1
...
...
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