Beispiel #1
0
 public function getData()
 {
     $posts = Post::minimum()->get();
     $json = '{"records" : ' . json_encode(Post::minimum()->with('categories')->with('users')->take(2)->get()) . '}';
     /*this how to make json formated for table relation*/
     return $json;
 }