Request::json PHP Method

json() public static method

Get the JSON payload for the request.
public static json ( string $key = null, mixed $default = null ) : mixed
$key string
$default mixed
return mixed
        public static function json($key = null, $default = null)
        {
            return \Illuminate\Http\Request::json($key, $default);
        }

Usage Example

Example #1
0
 /**
  * Get the inputs directly or from the batch request input
  * @return mixed
  */
 protected function getInputs()
 {
     if (!is_null(self::$currentRequest)) {
         return self::$currentRequest->json()->all();
     } else {
         return \Input::all();
     }
 }
All Usage Examples Of Request::json