Controller中这么写:
view('index',['data'=>$data]);
blade页面中:
{{$data}}
就在页面中输出$data的值了,注意页面中输出的变量名要和渲染页面是传递过来的变量的key一致