Laravel Pint is a lightweight PHP framework designed for rapid web application development, emphasizing simplicity and elegance. It offers robust features like routing, ORM, authentication, and templating, making it ideal for building scalable and maintainable web projects with ease.
- Install Package
composer require laravel/pint --dev
- Create
pint.json
{
"preset": "laravel",
"rules": {
"array_indentation": true,
"binary_operator_spaces": {
"default": "single_space"
},
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"blank_line_before_statement": {
"statements": ["return"]
},
"braces": {
"position_after_control_structures": "same",
"position_after_functions_and_oop_constructs": "next",
"position_after_anonymous_constructs": "same"
},
"concat_space": {
"spacing": "one"
},
"method_argument_space": {
"on_multiline": "ensure_fully_multiline"
},
"phpdoc_to_comment": false,
"no_unused_imports": true,
"no_whitespace_in_blank_line": true
}
}
- Run Pint
./vendor/bin/pint
php artisan serve