1
我需要帮助这里laravel我试图从数据库中获取两个记录,并传递这两个对象到目前为止记录被retreived但只有一个变量传递给视图为什么是这样的?laravel 5.2检索多个记录
$slides = \App\slides::all();
$followup = Text_Pages::where('machine_name', 'Follow up')->firstOrFail();
$branches = Text_Pages::where('machine_name', 'branches')->firstOrFail();
return view('index',
['slides' => $slides],
['branches' => $branches],
['followup' => $followup]
);
非常感谢你的回答是perftect –