Get a package skeleton and all other `make` commands from laravel base for package development.
marothyzsolt/laravel-package-generator is a Laravel package for get a package skeleton and all other `make` commands from laravel base for package development..
It currently has 1 GitHub stars and 8 downloads on Packagist (latest version 0.9).
Install it with composer require marothyzsolt/laravel-package-generator.
Discover more Laravel packages by marothyzsolt
or browse all Laravel packages to compare alternatives.
Last updated
All the make commands you use in your daily Laravel app development workflow but for packages! This package was created solely for the purpose to make package development as fast and easy as possible. Creating a new package only takes one command (make:package) and you will end up with the following file structure:
.
└── package
├── .codecov.yml
├── composer.json
├── CONTRIBUTING.md
├── .gitignore
├── LICENSE.md
├── phpunit.xml
├── readme.md
├── src
│ └── PackageServiceProvider.php
├── .styleci.yml
├── tests
│ └── TestCase.php
└── .travis.yml
composer require marothyzsolt/laravel-package-generator --dev
php artisan make:package
php artisan make:nova
php artisan package:add
If you have already created a package or you want to add a modified version of a package which is currently only available locally, you can use the following command to add you package to your project. It does simply add your package to your project`s composer repositories and requires a local version of it.
This command is run by make:package automatically, so you have no need to execute it after creating a package!
php artisan package:save
{namespace : Root namespace of the package (Vendor\Package_name)}
{path : Relative path to the package's directory}
Every package:* command needs to know the package's namespace and the relative path to the location your package is stored. Because of that every package:* command comes with those two options by default. To avoid entering those two options every time a package:* command executed this command saves the credentials of your package in the cache.
php artisan package:delete
This one wipes all stored credentials from your cache.
php artisan package:clone
{src : Source path of the package to clone}
{target : Path where it should be cloned in}
The clone command clones a given repository or directory into the given target.
php artisan package:replace
{path : The path to a file or directory}
{--O|old=* : Old strings which will be replaced}
{--N|new=* : New strings which will be used as replacement}'
The replace command takes a path of a file or a directory and an indefinite number of 'old' options which will be replaced by the 'new' options.
All of these commands do have all arguments & options to which you are used to in a normal laravel app! To execute any of these commands simply add the prefix package:.
channelconsoleeventexceptionjoblistenermailmodelnotificationobserverpolicyproviderrequestresourceruletestfactorymigrationseedercontrollermiddlewareAll of the following routes only accept a name argument.
contractinterface (same as contract)traitpackage:basetest {provider : The package's provider name} - creates TestCase in tests folderpackage:codecov - creates a .codecov.yml filepackage:composer {--author : The author of the package.} {--email : The author's email.} - creates composer.jsonpackage:contribution - creates CONTRIBUTING.mdpackage:gitignore - creates .gitignore filepackage:license {--copyright : The company or vendor name to place it int the license file} - creates LICENSE.md filepackage:phpunit - creates phpunit.xmlpackage:readme {--author : The author of the package.} {--email : The author's email.} - creates readme.mdpackage:styleci - creates .styleci.ymlpackage:travis - creates .travis.ymlRun the tests with:
vendor/bin/phpunit
The MIT License (MIT). Please see License File for more information.