lundi 20 juin 2016

How to pass data to json from Database in Laravel

Here is my Row Query to get the data from database.

$users = DB::table('users')->get();

I want to pass my $users array data to json format. How can I do so?

I have tried using Eloquent Model. but didn't work.

Thank You in Advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire