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
208eb8a3
Commit
208eb8a3
authored
May 02, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move json method to input class.
parent
138d08c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
laravel/input.php
+19
-0
laravel/request.php
+0
-19
No files found.
laravel/input.php
View file @
208eb8a3
...
...
@@ -3,6 +3,13 @@
class
Input
{
/**
* The JSON payload for applications using Backbone.js or similar.
*
* @var object
*/
public
static
$json
;
/**
* The key used to store old input in the session.
*
* @var string
...
...
@@ -93,6 +100,18 @@ class Input {
}
/**
* Get the JSON payload for the request.
*
* @return object
*/
public
static
function
json
()
{
if
(
!
is_null
(
static
::
$json
))
return
static
::
$json
;
return
static
::
$json
=
json_decode
(
Request
::
foundation
()
->
getContent
());
}
/**
* Get a subset of the items from the input data.
*
* <code>
...
...
laravel/request.php
View file @
208eb8a3
...
...
@@ -10,13 +10,6 @@ class Request {
public
static
$route
;
/**
* The JSON payload for applications using Backbone.js or similar.
*
* @var object
*/
public
static
$json
;
/**
* The Symfony HttpFoundation Request instance.
*
* @var HttpFoundation\Request
...
...
@@ -80,18 +73,6 @@ class Request {
}
/**
* Get the JSON payload for the request.
*
* @return object
*/
public
static
function
json
()
{
if
(
!
is_null
(
static
::
$json
))
return
static
::
$json
;
return
static
::
$json
=
json_decode
(
static
::
foundation
()
->
getContent
());
}
/**
* Get an item from the $_SERVER array.
*
* @param string $key
...
...
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