Download the PHP package kerigard/laravel-commands without Composer
On this page you can find all versions of the php package kerigard/laravel-commands. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kerigard/laravel-commands
More information about kerigard/laravel-commands
Files in kerigard/laravel-commands
Package laravel-commands
Short Description Commands for Laravel
License MIT
Homepage https://github.com/kerigard/laravel-commands
Informations about the package laravel-commands
Laravel Commands
Commands for Laravel 10 and up.
Installation
Install package via composer:
Publish the configuration file using the vendor:publish
artisan command to configure or disable unnecessary commands:
Publish the stubs files using the vendor:publish
artisan command to change the structure of generated classes:
Usage
Pint
Running Laravel Pint via artisan command.
Argument | Description |
---|---|
paths | Run Pint on specific files or directories |
Option | Shortcut | Description |
---|---|---|
--verbose | -v | Show details of changes |
--test | -t | Inspect code for style errors without actually changing the files |
--dirty | -d | Modify the files that have uncommitted changes according to Git |
--preset[=PRESET] | -p | Use preset with rule set to fix code |
--config[=CONFIG] | -c | Use pint.json config from a specific directory |
Examples
Run Laravel Pint.
Run with arguments:
Make Enum
Create a new enum class.
Argument | Description |
---|---|
name | The name of the enum |
Option | Shortcut | Description |
---|---|---|
--force | -f | Create the class even if the enum already exists |
--help | -h | Display help for the given command |
Examples
Create a enum class:
Creates a file
app/Enums/Status.php
.
Make Trait
Create a new trait class.
Argument | Description |
---|---|
name | The name of the trait |
Option | Shortcut | Description |
---|---|---|
--force | -f | Create the class even if the trait already exists |
--help | -h | Display help for the given command |
Examples
Create a trait class:
Creates a file
app/Traits/HasRoles.php
.
Make Contract
Create a new contract interface.
Argument | Description |
---|---|
name | The name of the contract |
Option | Shortcut | Description |
---|---|---|
--action | -a | Create a contract for an action |
--force | -f | Create the interface even if the contract already exists |
--help | -h | Display help for the given command |
Examples
Create a contract interface:
Creates a file
app/Contracts/CreatesUser.php
.
Create a contract for action:
Creates a file
app/Contracts/CreatesUser.php
.
Make Action
Create a new action class.
Argument | Description |
---|---|
name | The name of the action |
Option | Shortcut | Description |
---|---|---|
--contract[=CONTRACT] | -c | Create a new contract for the action |
--force | -f | Create the class even if the action already exists |
--help | -h | Display help for the given command |
Examples
Create a action class:
Creates a file
app/Actions/CreateUser.php
.
Create action and contract:
Creates
app/Actions/CreateUser.php
andapp/Contracts/CreatesUser.php
files.
Create action and contract with the same name:
Creates
app/Actions/CreateUser.php
andapp/Contracts/CreateUser.php
files.
Make Service
Create a new service class.
Argument | Description |
---|---|
name | The name of the service |
Option | Shortcut | Description |
---|---|---|
--contract[=CONTRACT] | -c | Create a new contract for the service |
--force | -f | Create the class even if the service already exists |
--help | -h | Display help for the given command |
Examples
Create a service class:
Creates a file
app/Services/UserService.php
.
Create service and contract:
Creates
app/Services/UserService.php
andapp/Contracts/User.php
files.
Create service and contract with the same name:
Creates
app/Services/UserService.php
andapp/Contracts/UserService.php
files.
Changelog
Please see the CHANGELOG for more information on what has changed recently.
License
MIT. Please see the LICENSE FILE for more information.