jeudi 4 mai 2017

conbine response return and view

I have two return in my controller method. How can I combine both?

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);}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2q22sf1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire