Skip to content

Laravel builder macros for the Eloquent ORM

License

Notifications You must be signed in to change notification settings

kevinsimard/laravel-builder-macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Builder Macros

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.