stevenmaguire/elvish-ipsum

Elvish ipsum generator.

0.1.0 2015-10-29 03:30 UTC

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

tl;dr

Add random elvish words to your laravel application.

Required setup

composer require stevenmaguire/elvish-ipsum

In your config/app.php add 'Stevenmaguire\ElvishIpsum\Provider' to the end of the $providers array

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Stevenmaguire\ElvishIpsum\Provider',

),

Also in your config/app.php add 'Elvish' => 'Stevenmaguire\ElvishIpsum\ElvishFacade' to the end of the $aliases array

'aliases' => array(

    'App'             => 'Illuminate\Support\Facades\App',
    'Artisan'         => 'Illuminate\Support\Facades\Artisan',
    'Auth'            => 'Illuminate\Support\Facades\Auth',
    ...
    'Elvish'          => 'Stevenmaguire\ElvishIpsum\ElvishFacade',

),

Usage

When you want to include elvish text in your project, simply call one of the following methods:

    $words = Elvish::getWords(10);
    $sentences = Elvish::getSentences(6);
    $paragraphs = Elvish::getParagraphs(2);

Originally crafted to support a project I demo'd at a Chicago Laravel Meetup