At the moment I have a list of employees as a json file.
{
"id": 1,
"departments": "1",
"name": "Bill Smith",
"profilePic": "/img/people/Office/bill-smith.jpg",
"title": "Office Manager"
},
I now want to store these in the database but still return them as JSON.
How do I set this up with my routes? It will be a very basic filter, by department id.
I presume I would do a get request
Route::get('people/{department}', function () {
});
How do I return the json?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire