Find bigger field in a table with Eloquent

1

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?

    
asked by anonymous 12.12.2017 / 20:43

0 answers