zephyrphp / laravel-presets
Presets are an opinionated coding style for your Laravel application.
0.1
2024-12-01 12:58 UTC
Requires
- php: ^8.0
- illuminate/contracts: ^11.0
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0
- rector/rector: ^1.2
This package is auto-updated.
Last update: 2025-05-12 02:21:42 UTC
README
Presets are an opinionated coding style for your Laravel application.
Installation
You may install Presets via Composer:
composer require zephyrphp/laravel-presets --dev
You can install Presets by invoking the install
command that is available via artisan
:
php artisan presets:install
Usage
Configuration
Presets publish some configuration using the app/Providers/AppServiceProvider.php
configuration file :
$this->configureCommands(); $this->configureDates(); $this->configureModels(); $this->configurePasswordValidation(); $this->configureUrl();
Tooling
Presets uses a few tools to ensure the code quality and consistency :
- Pest is the testing framework,
- PHPStan for static analysis,
- Laravel Pint to ensure the code is consistent and follows the Laravel conventions.
- Rector to ensure the code is up to date with the latest PHP version.
You run these tools using the following commands:
# Lint using Pint composer code:lint # Refactor using Rector composer code:refactor # Analyse using PHPStan composer code:analyse # Test using Pest composer code:test # Run all the test using Pint, Rector, PHPStan & Pest composer test