Create Package Scaffolding with Laravel Packer


October 23rd, 2020


Laravel Packer is a command line tool by Sarthak Shrivastava for speeding up your package creation. You can use all artisan commands while you create a Laravel package, and create CRUD for models you create in your packages. To create a new package you can use the packr CLI, which will create all the package scaffolding for you:

packr new your-package-name {vendor} {author} {author_email}

As you develop your package you can use familiar Artisan commands to generate package controllers, models, etc.:

packr make:controller ExampleController
packr make:model Post

Packer is built with Laravel Zero and you can find detailed tutorials about this combination (published by Sarthak) on his YouTube playlist:

You can learn more about this package, get full installation instructions, and view the source code on GitHub at bitfumes/laravel-packer.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.