teamtnt/sales-management

A minimalistic approach to sales management

Maintainers

Package info

github.com/teamtnt/sales-management

pkg:composer/teamtnt/sales-management

Transparency log

Statistics

Installs: 668

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0


README

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

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require teamtnt/sales-management

You can publish and run the migrations with:

php artisan vendor:publish --tag="sales-management-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="sales-management-config"

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="sales-management-views"

Publishing assets

php artisan vendor:publish --tag="sales-management-assets"

Local Development Setup

To develop this package locally and see your changes immediately in a Laravel host application:

1. Symlink the PHP Package (Composer)

In your host application's composer.json file:

  1. Add the local path repository pointing to this package's directory:
    "repositories": [
        {
            "type": "path",
            "url": "../sales-management",
            "options": {
                "symlink": true
            }
        }
    ]
  2. Update the package version requirement to target your active branch (e.g. dev-main):
    "require": {
        "teamtnt/sales-management": "dev-main"
    }
  3. Run the update command to symlink the package:
    • For local environments (Valet, Herd, Native PHP):
      composer update teamtnt/sales-management
    • For Docker environments: Run the composer update command inside the container to ensure the relative symlink resolves correctly within the container's virtualized filesystem:
      docker exec <container_name> composer update teamtnt/sales-management

2. Symlink the Public Assets (Vite)

This package compiles frontend assets into its own public/sales-management directory. To see JS/CSS changes immediately in the host app without repeatedly running php artisan vendor:publish:

  • For local environments (Valet, Herd, Native PHP): From the host application's root directory, run:
    rm -rf public/sales-management
    ln -s ../vendor/teamtnt/sales-management/public/sales-management public/sales-management
  • For Docker environments: Because Docker virtualization layers (like VirtioFS or gRPC FUSE) isolate mounts and restrict relative symlinks that traverse outside of the project volume, you should create an absolute container-internal symlink instead:
    docker exec <container_name> rm -rf /var/www/<host_app>/public/sales-management
    docker exec <container_name> ln -s /var/www/sales-management/public/sales-management /var/www/<host_app>/public/sales-management

3. Building & Compiling Assets

When editing JS/CSS files within the package:

  1. Make sure npm dependencies are installed in the package directory:
    npm install
  2. Run Vite build to compile changes:
    npm run build

Usage

$salesManagement = new Teamtnt\SalesManagement();
echo $salesManagement->echoPhrase('Hello, Teamtnt!');

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.