jeudi 5 janvier 2017

baum node not return json

I used Baum node in my Laravel project. I have this code:

  public function index(){

    $rootTag = Tag::root()->children()->get();

    return response()->json($rootTag, 200);
 }

but it always crashed, when it is executed. There is endless loading and nothing is displayed on screen.I dont know why. When I tried to add this code:

dd($rootTag)

it is work fine. However, problem is, when I want json like output. What can be the problem ?



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

Aucun commentaire:

Enregistrer un commentaire