Skip to content

A minimal Laravel package skeleton with some batteries included. Based on https://github.com/plakhin/php-package-skeleton.

License

Notifications You must be signed in to change notification settings

plakhin/laravel-package-skeleton

Repository files navigation

Tests

Laravel Package Skeleton

This repository provides a minimal Laravel package skeleton with some batteries included.
Based on php-package-skeleton template.

Installation

You can install the package via composer:

composer require plakhin/laravel-package-skeleton

Then you need to publish and run package migrations:

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

Then you may optionally publish the config file, translations, views and assets with:

php artisan vendor:publish --tag="skeleton-config"
php artisan vendor:publish --tag="skeleton-translations"
php artisan vendor:publish --tag="skeleton-views"
php artisan vendor:publish --tag="skeleton-assets"

Usage

use Plakhin\LPSkeleton\Facades\Skeleton;

Skeleton::foo(); // string(3) "bar"

Contributing

Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.

Process

  1. Fork the project
  2. Create a new branch
  3. Code, test, commit and push
  4. Open a pull request detailing your changes.

Guidelines

  • Please ensure the coding style running composer lint.
  • Please keep the codebase modernized using automated refactors with Rector composer refactor.
  • Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
  • You may need to rebase to avoid merge conflicts.
  • Please remember to follow SemVer.

Linting

composer lint

Refactoring with Rector

composer refactor

Testing

Run all tests:

composer test

Check code style:

composer test:lint

Check possible code improvements:

composer test:refactor

Check types:

composer test:types

Run Unit tests:

composer test:unit

Changelog

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

Credits

License

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

About

A minimal Laravel package skeleton with some batteries included. Based on https://github.com/plakhin/php-package-skeleton.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages