Kyslik / artisan-stubs by Kyslik

Override default artisan make stubs
570
9
2
Package Data
Maintainer Username: Kyslik
Maintainer Contact: martinkiesel@gmail.com (Martin Kiesel)
Package Create Date: 2016-09-04
Package Last Update: 2017-03-03
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-23 03:19:06
Package Statistics
Total Downloads: 570
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 9
Total Watchers: 2
Total Forks: 3
Total Open Issues: 1

Overrider of Artisan make:whatever stubs

Latest Version Software License Total Downloads

Override default artisan make stubs

Setup

Composer

Pull this package in through Composer (development/latest version dev-master).

composer require kyslik/artisan-stubs

or

Add to composer.json following (for Laravel 5.4):

{
    "require": {
        "kyslik/artisan-stubs": "2.*"
    }
}
$ composer update

Add the package to your application service providers in config/app.php

'providers' => [

    App\Providers\RouteServiceProvider::class,

    /*
     * Third Party Service Providers...
     */
    Kyslik\ArtisanStubs\ArtisanStubsServiceProvider::class,
],

Publish stubs

$ php artisan vendor:publish --provider="Kyslik\ArtisanStubs\ArtisanStubsServiceProvider" --tag="stubs"

Tip

add .gitignore to your /resources folder

$ echo "/stubs" >  ./resources/.gitignore

Usage

Simply edit resources/stubs/*.stub you like and enjoy artisan commands as usual.

Idea from

Q&A