User::orderByRandom()->first();
User::where...->orderByRandom()->get();
Add the Kevinsimard\BuilderMacros\Providers\OrderByRandomServiceProvider
service provider in config/app.php
.
├── src
│ └── Providers
│ └── OrderByRandomServiceProvider.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json
This package is open-sourced software licensed under the MIT license.