Laravel Packages

Bootstrap Laravel 5 Packages with Bootpack

Published
Bootstrap Laravel 5 Packages with Bootpack image

Bootpack is a Laravel 5 package bootstraper by Erik Campobadal that helps you create new Laravel 5 packages with the following features:

  • Creates composer.json for a laravel package
  • Create a basic well-structured package directory
  • Adds the local autoloader to the project composer.json
  • Dumps the autoload
  • Adds the package service provider to the laravel project
  • Initiates a git repository

Once installed you can use it with the following command to create a new package:

php artisan bootpack:create LaravelNews/example

The Bootpack command will walk you through setting up your package, including adding a LICENSE, a starter README, translations, and migrations. You can remove and modify the folders that are relevant to your project.

Here’s an example starter project structure once you walk through the guided setup:

packages/LaravelNews
└── example
    ├── composer.json
    ├── LICENSE
    ├── README.md
    └── src
        ├── Assets
        │   └── README.md
        ├── Classes
        │   ├── ExampleClass.php
        │   └── README.md
        ├── Commands
        │   ├── ExampleCommand.php
        │   └── README.md
        ├── Config
        │   └── example.php
        ├── Contracts
        │   ├── ExampleContract.php
        │   └── README.md
        ├── Controllers
        │   ├── ExampleController.php
        │   └── README.md
        ├── ExampleServiceProvider.php
        ├── Middleware
        │   ├── ExampleMiddleware.php
        │   └── README.md
        ├── Migrations
        │   ├── 2017_08_11_171401_create_Example_table.php
        │   └── README.md
        ├── Routes
        │   ├── api.php
        │   ├── README.md
        │   └── web.php
        ├── Translations
        │   ├── en
        │   │   └── basic.php
        │   └── README.md
        └── Views
            ├── README.md
            └── sample.blade.php

Check out the bootpack repository for more information on Bootpack to quickly start developing a new package in your Laravel 5 projects.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Laravel AI SDK 1.4 Lets Agents Recover From Tool Failures image

Laravel AI SDK 1.4 Lets Agents Recover From Tool Failures

Read article
Laravel Read Replicas: Check if a Replica Has Caught Up image

Laravel Read Replicas: Check if a Replica Has Caught Up

Read article
UUID Request Input and Migration Failure Events in Laravel 13.42 image

UUID Request Input and Migration Failure Events in Laravel 13.42

Read article
Replay Missed Laravel Scheduled Tasks With Schedule Catchup image

Replay Missed Laravel Scheduled Tasks With Schedule Catchup

Read article
Search Polymorphic Relations and Filament Tables With Laravel Searchable image

Search Polymorphic Relations and Filament Tables With Laravel Searchable

Read article
Laravel Rest Api 3.0: Typed Fields, Metrics, and OpenAPI Docs image

Laravel Rest Api 3.0: Typed Fields, Metrics, and OpenAPI Docs

Read article