我正在制作滑动菜单.我已成功在组导航视图中创建导航抽屉和菜单项.但我想让这些物品彼此更接近.我可以更改项目和文本的间距或大小吗?请帮忙...
通常,在 Laravel 中验证表单请求时,我们可以使用 $validation->messages() 访问错误。例如:
object(Illuminate\Support\MessageBag)#184 (2) { ["messages":protected]=> array(2) { ["email"]=> array(1) { [0]=> string(40) "The email must be a valid email address." } ["password"]=> array(2) { [0]=> string(41) "The password confirmation does not match." [1]=> string(43) "The password must be at least 6 characters." } } ["format":protected]=> string(8) ":message" }.
Run Code Online (Sandbox Code Playgroud)
是否有一些优雅的方法将对象 MessageBag 转换为示例数组,例如:
[
object({"email" => "The email must be a valid email address."}),
object({"password" => "The password confirmation does not match."})
...
]
Run Code Online (Sandbox Code Playgroud)
PS:如果在 MessageBag 中,任何字段有多个项目,我只想要结果对象数组中的第一项。
提前致谢。
我在我的容器映像中定义了一个入口点,它应该在我的部署清单中指定的 args 之前运行。但是当我使用 对该容器执行命令时kubectl exec,它似乎绕过了容器入口点。这是预期的行为吗?我可以以某种方式强制它始终使用入口点命令吗?