Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to send more than one array using response() json() in laravel

$user= User::all()->toArray();
$post= Post::all()->toArray();
$comment= Comment:all()->toArray();

Response::json(['user'=>$user,'post'=>$post,'comment'=>$comment]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #send #array #laravel
ADD COMMENT
Topic
Name
8+1 =