EDITED: From the oldest 5 posts, I want to get one row from those in random.
How can I get a random row from the oldest 5 row?
I tried these below:
Post::oldest(5)->random()->first();
But return me an error:
Call to undefined method Illumi nate\Database\Eloquent\Builder::random()
Someone knows how to do it in simple and neatest way?