iVampireSP / lumen-generator by iVampireSP

A Lumen Generator You Are Missing (forked from flipboxstudio/lumen-generator)
9
0
2
Package Data
Maintainer Username: iVampireSP
Maintainer Contact: im@ivampiresp.com (iVampireSP)
Package Create Date: 2022-03-08
Package Last Update: 2023-12-15
Language: PHP
License: MIT
Last Refreshed: 2024-04-19 15:16:35
Package Statistics
Total Downloads: 9
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 1

Lumen Generator

由于我看原仓库好久没更新了lumen 9适配了所以自己整了一下

原仓库地址:https://github.com/flipboxstudio/lumen-generator

Origin repo: https://github.com/flipboxstudio/lumen-generator

Installation

To use some generators command in Lumen (just like you do in Laravel), you need to add this package:

composer require ivampiresp/lumen-generator

Configuration

Inside your bootstrap/app.php file, add:

$app->register(iVampireSP\LumenGenerator\LumenGeneratorServiceProvider::class);

Available Command

key:generate         Set the application key

make:cast            Create a new custom Eloquent cast class
make:channel         Create a new channel class
make:command         Create a new Artisan command
make:controller      Create a new controller class
make:event           Create a new event class
make:exception       Create a new custom exception class
make:factory         Create a new model factory
make:job             Create a new job class
make:listener        Create a new event listener class
make:mail            Create a new email class
make:middleware      Create a new middleware class
make:migration       Create a new migration file
make:model           Create a new Eloquent model class
make:notification    Create a new notification class
make:pipe            Create a new pipe class
make:policy          Create a new policy class
make:provider        Create a new service provider class
make:request         Create a new form request class
make:resource        Create a new resource
make:rule            Create a new rule
make:seeder          Create a new seeder class
make:test            Create a new test class

notifications:table  Create a migration for the notifications table

schema:dump          Dump the given database schema

Additional Useful Command

clear-compiled    Remove the compiled class file
serve             Serve the application on the PHP development server
tinker            Interact with your application
optimize          Optimize the framework for better performance
route:list        Display all registered routes.

NOTES route:list command has been added via appzcoder/lumen-route-list package.

Tinker include Argument Usage

php artisan tinker path/to/tinker/script.php

script.php example:

$environment = app()->environment();
$output = new Symfony\Component\Console\Output\ConsoleOutput();
$output->writeln("<info>Hello the app environment is `{$environment}`</info>");
$output->writeln("<comment>Did something</comment>");
$output->writeln("<error>Did something bad</error>");