Download the PHP package zpmlabs/laravel-package-quick-demo without Composer

On this page you can find all versions of the php package zpmlabs/laravel-package-quick-demo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-package-quick-demo

Laravel Package Quick Demo

Reusable quick-demo installer for Laravel packages.

zpmlabs/laravel-package-quick-demo lets Laravel package authors ship isolated demo environments inside any host Laravel application.

It is built for packages that want a “try it now” experience without asking users to manually copy files, edit .env, create database connections, register routes, or pollute their main application database.

With this package, a user can install a package demo with one command:


Features


Installation

Install the package:

Publish the config file if needed:

This publishes:


Configuration

Default config:

Most package authors do not need users to publish this config. Demos can be registered directly from a package service provider.


Basic usage in another package

Example package: vendor/blog-package.

Inside the package service provider:

Then the user runs:


Minimal database-only demo

A demo does not need routes, views, assets, storage, or config.

For a database-only demo, register only database, migrations, and seeders:

Install it:

This creates a separate SQLite database and runs only the configured migrations and seeders.


Full demo package structure

Recommended structure for a package that ships a complete mini demo app:


Commands

List all registered demos:

Show details for one demo:

Install a demo:

Reinstall a demo from scratch:

Reinstall from scratch and overwrite generated files:

Skip migrations:

Skip seeders:

Skip view publishing:

Skip asset publishing:

Skip storage publishing:

Skip config publishing:

Uninstall generated demo files:

Drop only the generated SQLite database:

Remove everything generated by the demo:


SQLite database isolation

Every registered demo gets its own SQLite database.

For example:

creates:

The package also registers a runtime Laravel connection:

Another package can register:

which creates:

and registers:

These databases are independent.

The package does not modify .env and does not require users to edit config/database.php.


SQLite stub files

Each demo can provide a SQLite stub file:

The stub may be:

Recommended approach:

Create an empty stub:


Demo migrations

Every demo migration should explicitly use the quick-demo connection.

examples/migrations/2026_01_01_000001_create_demo_posts_table.php

This prevents demo tables from being created in the host application's default database.


Demo seeders

Every demo seeder should write to the quick-demo connection.

src/Database/Seeders/BlogDemoSeeder.php


Demo models

Demo models should use the quick-demo connection.

src/Models/DemoPost.php


Demo routes

A package can provide routes for a demo UI.

examples/routes/demo.php

The package automatically mounts these routes under a safe prefix:

Route names are prefixed too:

This avoids collisions with the host application.


Demo controller

Example controller:


Demo views

A package can ship Blade views in:

Example:

Views are registered under a generated namespace:

Usage:

When installed, views are published to:

The published path is checked first. The package source path is used as fallback.


Demo assets

A package can ship demo assets in:

Example:

Assets are published to:

Usage in Blade:


Demo storage files

A package can ship sample storage files in:

Example:

Files are copied to:

Usage:


Demo config files

A package can ship a demo config file:

It is copied to:

The package does not modify existing application config files.


Config-based demo registration

Demos may also be registered through config/package-quick-demo.php.

Runtime registration from a package service provider is usually preferred.


Install and uninstall hooks

A demo can run custom logic before or after installation and uninstallation.

Hook classes should have a handle method:

The context contains useful information:

Hooks can also be closures or callable arrays.


Safe uninstall behavior

By default, uninstall does not remove everything automatically.

Use specific flags:

Remove everything:


Generated paths

For demo key:

and database name:

Generated paths are:

Generated route prefix:

Generated route name prefix:

Generated view namespace:

Generated connection:


Recommended naming

Good demo keys:

Avoid vague keys:

Good database names:

Good table names:

Avoid using real application table names for demo tables:


Safety rules

This package is designed to avoid polluting the host Laravel application.

It does not require users to:

Package authors should avoid:


Testing a demo locally

From a Laravel test application:

Open:

Validate:

Check that:


License

MIT


All versions of laravel-package-quick-demo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/filesystem Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zpmlabs/laravel-package-quick-demo contains the following files

Loading the files please wait ...