我有兩個返回在我的控制器方法。 我怎樣才能結合兩者?conbine響應返回和查看
public function index()
{
$data=Event::get(['title','start','color']);
$objectifs=Objectif::all();
$ob=Array('objectifs'=>$objectifs);
return view('newc')->with('objectifs', $objectifs);
return Response()->json($data);}
的我知道,我不能用2回我需要conbin兩者的回報在同一個控制器 – maryemz
請閱讀laravel文檔正確 – Gowthaman
正是我解決了我的問題,通過使用2個控制器thanx爲您的幫助 – maryemz