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