Skip to content

simple package for using the loremricksum.com API in laravel

License

Notifications You must be signed in to change notification settings

cberane/loremricksum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoremRicksum in Laravel

As a fan of Rick & Morty I wanted to be able to use LoremRicksum in Laravel to dynamically generate funny quotes in seeders or live in a demo-page (i.e. with random number of paragraphs and quotes)

Facade

The package service provider registers the facade with autoloading. You can use the following methods:

  • LoremRicksum::getPlaintext($paragraphs=1, $quotes=3)
  • LoremRicksum::getHtml($paragraphs=1, $quotes=3)

Testing

  • implemented with/for Laravel 6 LTS. I guess it is compatible with later versions
  • I did not implement any unit-tests for the sake of simplicity - it is just for fun and not meant for any production systems ;-)
  • I only used assertions to prevent unwanted behaviour if the api breaks (unavailable, new calls)

Thanks

Many thanks to @emillinden and @adameriksson for the creation of the api :-)

About

simple package for using the loremricksum.com API in laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages