kevinsimard/laravel-builder-macros

Laravel builder macros for the Eloquent ORM

v1.1.1 2016-04-07 01:23 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:25:58 UTC


README

Usage

orderByRandom

User::orderByRandom()->first();
User::where...->orderByRandom()->get();

Installation

Add the Kevinsimard\BuilderMacros\Providers\OrderByRandomServiceProvider service provider in config/app.php.

Code Structure

├── src
│   └── Providers
│       └── OrderByRandomServiceProvider.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json

License

This package is open-sourced software licensed under the MIT license.