我有两个返回在我的控制器方法。 我怎样才能结合两者?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