Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xammie/make-commands

Extended laravel make commands
https://github.com/xammie/make-commands

artisan-commands laravel php

Last synced: 9 days ago
JSON representation

Extended laravel make commands

Awesome Lists containing this project

README

        

# Extended make commands for laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/xammie/make-commands.svg?style=flat-square)](https://packagist.org/packages/xammie/make-commands)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/xammie/make-commands/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/xammie/make-commands/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/xammie/make-commands/pint.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/xammie/make-commands/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/xammie/make-commands.svg?style=flat-square)](https://packagist.org/packages/xammie/make-commands)

This package extends the default laravel make commands to create classes like actions, services, enums and more.

```bash
php artisan make:action CreateUserAction
```

This will create the file `app/Actions/CreateUserAction.php`

```php
[
'action' => 'Actions',
'collection' => 'Collections',
'config' => 'config',
'contract' => 'Contracts',
'dto' => 'Dtos',
'enum' => 'Enums',
'interface' => 'Interfaces',
'repository' => 'Repositories',
'service' => 'Services',
'trait' => 'Traits',
],
];
```

## Usage

The following commands are available.

```
php artisan make:action CreateUserAction
php artisan make:collection OrderCollection
php artisan make:config config-file
php artisan make:contract CreatesUserContract
php artisan make:dto RestRequestObject
php artisan make:enum OrderStatusEnum
php artisan make:interface OrderRepositoryInterface
php artisan make:repository OrderRepository
php artisan make:service PaymentService
php artisan make:trait TraitHelper
```

## Testing

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Max Hoogenbosch](https://github.com/Xammie)
- [All Contributors](../../contributors)

## License

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