I'm using Laravel for an API
In my DB I have a table called tbmanifestacao
and in this table I have a column called nrmanifestacao
I would like my controller to return the highest nrmanifestacao
I tried this way:
$nr = DB::select('select MAX(nrmanifestacao) from tbmanifestacao', [1]);
But it did not work, besides dq I know that it is not correct to use SQL, but rather the Eloquent
How could I do this search?