request()->json() in laravel code example Example: laravel json response return response()->json([ 'name' => 'Abigail', 'state' => 'CA', ]);