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
39601e8a
Commit
39601e8a
authored
Apr 24, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs in input class.
parent
3241de0c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
changes.md
laravel/documentation/changes.md
+1
-0
input.php
laravel/input.php
+23
-1
No files found.
laravel/documentation/changes.md
View file @
39601e8a
...
...
@@ -55,6 +55,7 @@
-
Added
`Request::set_env`
method.
-
`Schema::drop`
now accepts
`$connection`
as second parameter.
-
Added
`Input::merge`
method.
-
Added
`Input::replace`
method.
<a
name=
"upgrade-3.2"
></a>
## Upgrading From 3.1
...
...
laravel/input.php
View file @
39601e8a
...
...
@@ -55,7 +55,14 @@ class Input {
*/
public
static
function
get
(
$key
=
null
,
$default
=
null
)
{
$value
=
array_get
(
Request
::
foundation
()
->
request
->
all
(),
$key
);
$input
=
Request
::
foundation
()
->
request
->
all
();
if
(
is_null
(
$key
))
{
return
array_merge
(
$input
,
static
::
query
());
}
$value
=
array_get
(
$input
,
$key
);
if
(
is_null
(
$value
))
{
...
...
@@ -82,6 +89,11 @@ class Input {
*/
public
static
function
query
(
$key
=
null
,
$default
=
null
)
{
if
(
is_null
(
$key
))
{
return
Request
::
foundation
()
->
query
->
all
();
}
return
array_get
(
Request
::
foundation
()
->
query
->
all
(),
$key
,
$default
);
}
...
...
@@ -151,6 +163,11 @@ class Input {
*/
public
static
function
old
(
$key
=
null
,
$default
=
null
)
{
if
(
is_null
(
$key
))
{
return
Session
::
get
(
Input
::
old_input
,
array
());
}
return
array_get
(
Session
::
get
(
Input
::
old_input
,
array
()),
$key
,
$default
);
}
...
...
@@ -168,6 +185,11 @@ class Input {
*/
public
static
function
file
(
$key
=
null
,
$default
=
null
)
{
if
(
is_null
(
$key
))
{
return
$_FILES
;
}
return
array_get
(
$_FILES
,
$key
,
$default
);
}
...
...
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