why not use the querybuilder function for this?
$getPages = Pages::where('author','feroz')->inRandomOrder()->pluck('id');
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi Guys,
I am using a random method to fetch the rows in a random manner. But i feel that random is not picking till the end of the table.
$getPages = Pages::where('author','feroz')->get()->random(10)->pluck('id');
Is that so?
If yes, can you please suggest me how I can go till the last row of the table.
Regards, Feroz.
why not use the querybuilder function for this?
$getPages = Pages::where('author','feroz')->inRandomOrder()->pluck('id');
Please or to participate in this conversation.