Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,23 @@ function response($content = '', $status = 200, array $headers = array())
}
}

if ( ! function_exists('json'))
{
/**
* Return a new JSON response from the application.
*
* @param string|array $data
* @param int $status
* @param array $headers
* @param int $options
* @return \Symfony\Component\HttpFoundation\Response
*/
function json($data = [], $status = 200, array $headers = [], $options = 0)
{
return app('Illuminate\Contracts\Routing\ResponseFactory')->json($data, $status, $headers, $options);
}
}

if ( ! function_exists('route'))
{
/**
Expand Down