Response::jsonp PHP Method

jsonp() public static method

Return a new JSONP response from the application.
public static jsonp ( string $callback, string | array $data = [], integer $status = 200, array $headers = [], integer $options ) : Illuminate\Http\JsonResponse
$callback string
$data string | array
$status integer
$headers array
$options integer
return Illuminate\Http\JsonResponse
        public static function jsonp($callback, $data = array(), $status = 200, $headers = array(), $options = 0)
        {
            return \Illuminate\Routing\ResponseFactory::jsonp($callback, $data, $status, $headers, $options);
        }

Usage Example

Example #1
0
 /**
  * Return a new JSONP response from the application.
  *
  * @param  string  $callback
  * @param  string|array  $data
  * @param  int    $status
  * @param  array  $headers
  * @param  int    $options
  * @return \Illuminate\Http\JsonResponse
  */
 public function jsonp($callback, $data = [], $status = 200, array $headers = [], $options = 0)
 {
     return \Response::jsonp($callback, $data, $status, $headers, $options);
 }
All Usage Examples Of Response::jsonp