Skip to content
Advertisement

PHP – Laravel take last row of table

I want to take last row of table using orderby. Results:

JavaScript

But I actually want is.

JavaScript

My code:

JavaScript

Advertisement

Answer

You could just group the data and get the MAX episode number:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement