vendredi 26 juillet 2019

Laravel 5 How to fetch only one row of latest data for a specific user in a database

I have a table of drug prescription were a prescription for all users stored. So I want to fetch the latest prescription row of a defined user by id.

I have tried to use where clause and latest method but some error occurred as shown here; Object of class Illuminate\Database\Eloquent\Builder could not be converted to a string.


The expected result was one latest row of the defined user by id



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire