2017 © Pedro Peláez
 

library laravel-file-generator

An easy extension of the Artisan make commands to modify the command's stubs and to generate fully implemented php files.

image

ferdinandfrank/laravel-file-generator

An easy extension of the Artisan make commands to modify the command's stubs and to generate fully implemented php files.

  • Thursday, February 15, 2018
  • by ferdinandfrank
  • Repository
  • 1 Watchers
  • 3 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel File Generator

Packagist Version Packagist GitHub license, (*1)

:warning: This repository has been archived since the functionality of the package is now natively supported by Laravel 7. See the Laravel 7 changelog for details., (*2)

This package is an easy extension of the Artisan make commands provided by your Laravel application to have the ability to modify the command's stubs to your personal needs and to generate fully implemented php classes (controller, requests, policies, etc.) for a specified model., (*3)

Requirements

  • PHP >=7.0.0
  • An existing >= Laravel 5.5 project (For Laravel 5.4 see version 1.0)

For the latest command options as described in the Wiki of this package use the latest Laravel version., (*4)

Installation

  1. To get started, install the package via the Composer package manager:, (*5)

    composer require ferdinandfrank/laravel-file-generator --dev
    
  2. Replace the entry Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class within your providers array in config/app.php:, (*6)

    php 'providers' => [ ... // Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, FerdinandFrank\LaravelFileGenerator\Providers\ConsoleSupportServiceProvider::class, ... ], (*7)

  3. The package should be auto-discovered by Laravel. For manual registration, add the following entry to your providers array in config/app.php:, (*8)

    'providers' => [
       ...
       ...
       FerdinandFrank\LaravelFileGenerator\Providers\FileGeneratorServiceProvider::class
    ]
    

That's it!, (*9)

Usage

You can use the Artisan make commands provided by your Laravel application as always. This package is just an extension to provide more options and the flexibility to specify your own stub files. For example, just execute the following command to create a new controller class with the name UserController but with your custom specified stub file (if one exist):, (*10)

php artisan make:controller UserController

For more details as well as a list of all available commands have a look at the wiki of this package., (*11)

Publishing stub files

To have the full benefits of this package you can execute the following command to publish all the stub files which are used to create the php files when executing an Artisan make command., (*12)

php artisan vendor:publish --tag=stubs

By default the stub files will be copied to the resources\stubs folder of your application. As soon as you call an Artisan make command after you executed this publishing command the stub files for generating a new php file will be used as the template from this folder. To modify the path to your stubs file have a look on the next section 'Configuration'., (*13)

Configuration

You have the possibility to modify the path to your stub files as well as other configuration options. Therefore you need to publish the configuration file of this package by the following command., (*14)

php artisan vendor:publish --tag=config

This command will generate the file laravel-file-generator.php within your config folder of your Laravel application., (*15)

Commands

You can see all details and documentation about the available make commands on the wiki of this package., (*16)

License

MIT, (*17)

The Versions

15/02 2018

dev-master

9999999-dev

An easy extension of the Artisan make commands to modify the command's stubs and to generate fully implemented php files.

  Sources   Download

MIT

The Requires

 

by Ferdinand Frank

laravel command artisan controller generate make stubs

15/02 2018

v1.1

1.1.0.0

An easy extension of the Artisan make commands to modify the command's stubs and to generate fully implemented php files.

  Sources   Download

MIT

The Requires

 

by Ferdinand Frank

laravel command artisan controller generate make stubs

19/02 2017

v1.0

1.0.0.0

An easy extension of the Artisan make commands to modify the command's stubs and to generate fully implemented php files.

  Sources   Download

MIT

The Requires

 

by Ferdinand Frank

laravel command artisan controller generate make stubs