Answers for "json responsei n laravel"

PHP
0

laravel return json header json

return response()->json($array, 202,
            [
                'Content-Type' => 'application/json',
                'Charset' => 'utf-8'
            ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
    }
Posted by: Guest on November-03-2021
1

laravel json response with error code

return Response::json([
    'hello' => $value
], 201); // Status code here
Posted by: Guest on March-05-2020

Browse Popular Code Answers by Language