Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种方法可以自动将数据返回到 laravel 中的每个视图,所以我不必在每个控制器中都这样做。就像在 BaseController 中一样?
是的,仔细阅读文档
View::share('name', $value);