spatie/package-skeleton-laravel

repository·main·Indexed 25 days ago

https://github.com/spatie/package-skeleton-laravel

A boilerplate repository for scaffolding Laravel packages. It includes pre-configured testing, migrations, and configuration publishing capabilities, featuring a configuration script to replace placeholders and a standard structure for publishing assets via the vendor:publish command.

Tokens
500
Snippets
4
Records
6
Agent score
32%

What's inside spatie-package-skeleton-laravel

  1. Publish migrations, config, and views

    main

    This package provides several assets that can be published to your Laravel application using the vendor:publish command:

    Migrations

    To publish and run the database migrations:

    php artisan vendor:publish --tag=":package_slug-migrations"
    php artisan migrate

    Configuration

    To publish the configuration file:

    php artisan vendor:publish --tag=":package_slug-config"

    The published config file follows this structure:

    return [
        // configuration options go here
    ];

    Views

    To publish the package views:

    php artisan vendor:publish --tag=":package_slug-views"
    php artisan vendor:publish --tag=":package_slug-migrations"
    php artisan migrate
    
    php artisan vendor:publish --tag=":package_slug-config"
    
    php artisan vendor:publish --tag=":package_slug-views"
  2. Scaffold a new Laravel package using this template

    main

    To use this repository as a starting point for your own Laravel package, follow these steps:

    1. Click the "Use this template" button at the top of the GitHub repository to create a new repository based on this skeleton.
    2. Run the configuration script to replace all placeholders (like :vendor_slug, :package_slug, etc.) with your actual package details:
      php ./configure.php
    3. Begin developing your package.
    php ./configure.php