如何将数据传递给布局文件?我只能访问内容页面上传递的数据,但不能访问布局文件.
public function get_index($name){
return View::make('widget.'.$name)
->with("title", ucwords($name).' ‹ Document Management System');
}
Run Code Online (Sandbox Code Playgroud)
使用
View::share('data', $data);
Run Code Online (Sandbox Code Playgroud)
在你的before过滤器或在__construct您的Base_Controller.
| 归档时间: |
|
| 查看次数: |
4965 次 |
| 最近记录: |