I'm looking for something like HttpResponseCode::FileNotFound => 404, HttpResponseCode::OK => 200

I've searched for "php http status codes list", "php http status codes enum" and couldnt find anything.

推荐答案

要搜索的词条是"php http status code const",它会将您带到http://symfony.com/blog/new-in-symfony-2-4-using-constants-for-http-status-code-它有\Illuminate\Http\Response::HTTP_NOT_FOUND\Illuminate\Http\Response::HTTP_OK

等.

List is here - https://github.com/symfony/HttpFoundation/blob/master/Response.php

Laravel相关问答推荐

如何在Laravel中创建自定义单项集合

如何让 Laravel 的 Collection 表现得像一个流?

按回车键时如何防止此功能运行?

如何在 Laravel 9 中获取带分页的订单列表?

Laravel 从 5.1 升级到 5.2.0 错误

Laravel 在维护模式下显示自定义消息

使用命令行界面停止 laravel 服务器

Laravel 5.1 - 如何在进度条上设置消息

Laravel + SQLite = SQLSTATE[HY000]一般错误:8次try 写入只读数据库

Laravel 5.4 有时验证规则不起作用

PHP Laravel:如何获取客户端浏览器/设备?

验证匹配字符串

我如何从给定的日期时间 struct 创建Carbon 对象?

Laravel 迁移 - 删除列

Laravel:在另一个控制器中加载方法而不更改 url

Laravel 获取查询字符串

如何判断是否在laravel中使用了分页

Laravel 5如何获取路由动作名称?

Laravel 更新查询

如何从 PHPUnit 测试设置运行 Laravel 数据库 seeder 机?