k3rielit / aforizma

A goofy hungarian alternative to the Inspiring command.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aforizma

A goofy hungarian alternative to Laravel's built in Inspiring command. Built as a way to test Laravel package development.

Install

composer require ahurkatolto/aforizma:dev-main

If composer complains, edit your project's composer.json as so:

"minimum-stability": "dev",
"prefer-stable": true

Usage

  1. Dependency injection
class AforizmaTestController extends Controller
{
    public function random(Aforizma $aforizma)
    {
        return view('aforizma', [
            'quote' => $aforizma->quote,
            'author' => $aforizma->author,
        ]);
    }
}
  1. Helper function
$aforizma = aforizma();
  1. Statically through the class itself
$aforizma = \Ahurkatolto\Aforizma\Aforizma::random();

About

A goofy hungarian alternative to the Inspiring command.

License:MIT License


Languages

Language:PHP 100.0%