flipboxstudio / lumen-generator

A Lumen Generator You Are Missing
https://packagist.org/packages/flipbox/lumen-generator
MIT License
824 stars 126 forks source link

Add a new make:exception command #78

Closed jorgemudry closed 4 years ago

jorgemudry commented 4 years ago

What does this Pull Request Do?

It fixes the issue #76

How should this be manually tested?

  1. Clone the repo from my fork:
git clone https://github.com/jorgemudry/lumen-generator.git;
git checkout feature_new_make_exception_command;
  1. Change the name property in the composer.json file:
"name": "jorgemudry/lumen-generator",
  1. In a new lumen project, add set up the local repository to the package in your composer.json:
    "repositories": {
        "dev-package": {
            "type": "path",
            "url": "../lumen-generator",
            "options": {
                "symlink": true
            }
        }
    }
  1. Add the package to your project:
composer require jorgemudry/lumen-generator
  1. Inside of your bootstrap/app.php add this:
$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);
  1. Execute the command to create a new exception:
php artisan make:exception MyPlainException
  1. You should end up with a new file inside of the folder looking like this:
<?php

namespace App\Exceptions;

use Exception;

class MyPlainException extends Exception
{
    //
}

Any extra info?

muppet