kevinsimard/laravel-builder-macros

Laravel builder macros for the Eloquent ORM
351 7
Install
composer require kevinsimard/laravel-builder-macros
Latest Version:v1.1.1
License:MIT
Last Updated:Mar 23, 2017
Links: GitHub  ·  Packagist
Maintainer: kevinsimard

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.