方法1,
接收变量
方法2,
接收变量
方法3,
接收变量
//routs.phpRoute::get('/about',function(){$first = 'hello';return view('about')->with('a',$first);});//about.blade.php{{ $a }}//routs.phpRoute::get('/about',function(){$data = array('a' => 'O','b' => 'K');return view('about',$data);});{{ $a }}{{ $b }}//routs.phpRoute::get('/about',function(){$first = 'hello';$last = 'world';//参数名称要对应return view('about',compact('first','last'));});//about.blade.php{{ $first }}{{ $last }}