Laravel 速查表
显示全部 1. Artisan 2. Auth 3. Blade 4. Cache 5. Collection 6. Composer 7. Config 8. Container 9. Cookie 10. DB 11. Environment 12. Event 13. File 14. Form 15. HTML 16. Helper 17. Input 18. Lang 19. Log 20. Mail 21. Model 22. Pagination 23. Queue 24. Redirect 25. Request 26. Response 27. Route 28. SSH 29. Schema 30. Security 31. Session 32. String 33. URL 34. UnitTest 35. Validation 36. View
Menu

Response

未匹配的标注
本文档最新版为 9.x,旧版本可能放弃维护,推荐阅读最新版!
return Response::make($contents);
return Response::make($contents, 200);
return Response::json(array('key' => 'value'));
return Response::json(array('key' => 'value'))
->setCallback(Input::get('callback'));
return Response::download($filepath);
return Response::download($filepath, $filename, $headers);
// 创建一个回应且修改其头部信息的值
$response = Response::make($contents, 200);
$response->header('Content-Type', 'application/json');
return $response;
// 为回应附加上 cookie
 return Response::make($content)
->withCookie(Cookie::make('key', 'value'));

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
讨论数量: 0
发起讨论 只看当前版本


暂无话题~