lmendes/package-name

A Laravel package description

Maintainers

Package info

github.com/Leo-76/Laravel-Template

pkg:composer/lmendes/package-name

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-13 01:16 UTC

This package is not auto-updated.

Last update: 2026-04-13 02:41:53 UTC


README

Latest Version on Packagist Total Downloads License

A short description of your Laravel package.

Requirements

  • PHP ^8.1
  • Composer ^2.0
  • Node.js ^18 & NPM
  • Laravel ^10.0 or ^11.0

Local Development Setup

Follow these steps to get the project running on your machine.

1. Clone & go to the project folder

cd ~/Downloads/laravel-package

2. Install PHP dependencies

composer install

This will generate the vendor/ folder and composer.lock automatically.

3. Set up the environment file

cp .env.example .env
php artisan key:generate

Edit .env to configure your database, mail, etc. By default, SQLite is used — no extra setup needed.

4. Run the database migrations

php artisan migrate

Optionally seed the database with test data:

php artisan db:seed

5. Install JS dependencies & start the dev server

npm install
npm run dev

For a production build, use npm run build instead.

Your application is now running at http://localhost:8000 (or use php artisan serve).

Installation via Packagist

Once published, install the package in any Laravel project:

composer require vendor-name/package-name

The package will auto-discover its service provider via Laravel's package auto-discovery.

Publish the config file (optional)

php artisan vendor:publish --tag=package-name-config

Publish the migrations (optional)

php artisan vendor:publish --tag=package-name-migrations
php artisan migrate

Run the installer command (optional)

php artisan package-name:install

Configuration

After publishing, edit config/package-name.php:

return [
    'enabled'    => env('PACKAGE_NAME_ENABLED', true),
    'option_one' => env('PACKAGE_NAME_OPTION_ONE', 'default_value'),
];

Usage

Via Facade

use VendorName\PackageName\Facades\PackageName;

echo PackageName::hello(); // "Hello from PackageName!"

Via Dependency Injection

use VendorName\PackageName\PackageName;

class MyController extends Controller
{
    public function __construct(protected PackageName $package) {}

    public function index()
    {
        return $this->package->hello();
    }
}

Via Service Container

$package = app('package-name');
echo $package->hello();

Testing

composer test

Changelog

Please see CHANGELOG.md for information on recent changes.

Contributing

Please see CONTRIBUTING.md for details.

License

The MIT License (MIT). Please see LICENSE.md for more information.