Route::get('home', function () {
    $content = "内容";
    $status = 301;
    $value = 'text/html';
//    return (new Response($content, $status))
//        ->header('Content-Type', $value);

//    return response($content, $status)
//        ->header('Content-Type', $value);


//    return response($content)
//        ->header('Content-Type', $value)
//        ->header('X-Header-One', 'Header Value')
//        ->header('X-Header-Two', 'Header Value');


//    return response($content)
//        ->withHeaders([
//            'Content-Type' => $value,
//            'X-Header-One' => 'Header Value',
//            'X-Header-Two' => 'Header Value',
//        ]);

    //return response()->json(['name' => 'Abigail', 'state' => 'CA']);



});

  

https://learnku.com/docs/lumen/5.3/responses/1884

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-06-29
  • 2021-04-29
  • 2022-12-23
  • 2022-01-06
  • 2022-02-26
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2022-02-12
  • 2022-12-23
  • 2021-11-15
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案