armezit/lunarphp-virtual-product


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Virtual products (also known as digital goods), represent non-tangible items such as memberships, services, warranties, subscriptions and digital downloadable goods like games, virtual game tokens, books, music, videos, or other products.

The Virtual Product addon for Lunar allows you to define virtual/digital products in your Lunar store.

Requirements

  • PHP ^8.1
  • Laravel 9+

Quick Setup

You can install the package via composer:

composer require armezit/lunarphp-virtual-product

Run the migrations with:

php artisan migrate

Usage

TBD.

Installation

Quick Setup covers the essential installation steps. This section, however, is a detailed installation procedure, containing all optional parts.

You can install the package via composer:

composer require armezit/lunarphp-virtual-product

Migrations

Publish the migrations and run them with:

php artisan vendor:publish --tag="lunarphp-virtual-product-migrations"
php artisan migrate

::: tip Table names are configurable. See the config file. :::

Config

You can publish the config file with:

php artisan vendor:publish --tag="lunarphp-virtual-product-config"

This is the contents of the published config file:

return [
    
];

Translations & Views

Optionally, you can publish the translations and views using

php artisan vendor:publish --tag="lunarphp-virtual-product-translations"
php artisan vendor:publish --tag="lunarphp-virtual-product-views"

Service provider

By default, this package automatically register it`s service providers when it is installed.

If for any reason you prefer to register them manually, you should add the package service providers into your laravel application's config/app.php file.

// ...
'providers' => [
    // ...
    Armezit\Lunar\VirtualProduct\VirtualProductServiceProvider::class,
    Armezit\Lunar\VirtualProduct\VirtualProductHubServiceProvider::class,
],

The VirtualProductServiceProvider bootstrap primary package features, while the VirtualProductHubServiceProvider is used to register some Slots to be used in Lunar Admin Hub.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.