[英]Can I use Request or other facade in eloquent model
Forgive me my poor English.I am a newbie for laravel.I have a few questions about the laravel eloquent model.I dont know if it is reasonable to use Requset object or other Facades in model class? 原谅我我的英语不好。我是laravel的新手。我对laravel雄辩的模型有一些疑问。我不知道在模型类中使用Requset对象或其他Facade是否合理? Are these facades only for controller use? 这些立面仅用于控制器吗? Thank you 谢谢
No, facades can be use any where. 不,外墙可以在任何地方使用。 For instance, you can use the Request facade anywhere even in views. 例如,即使在视图中,也可以在任何地方使用“请求”外观。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.