iak / make-class
A package to create basic classes with tests in your Laravel app
Installs: 1 704
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- illuminate/contracts: ^8.37
- spatie/laravel-package-tools: ^1.4.3
Requires (Dev)
- brianium/paratest: ^6.2
- nunomaduro/collision: ^5.3
- orchestra/testbench: ^6.15
- phpunit/phpunit: ^9.3
- vimeo/psalm: ^4.4
README
Create a custom class at any path with an optinal test.
Usage
Example:
$ php artisan make:class Custom/Folder/MyCoolClass
Will create a app/Custom/Folder/MyCoolClass.php
file containing:
<?php namespace App\Custom\Folder; class MyCoolClass { // }
Use the --test
option to create a corresponding test in test/Unit/Custom/Folder/MyCoolClassTest.php
using the default laravel unit test stub.
Customize the stub
Publish the stub using:
php artisan vendor:publish --tag=stub
And edit the stubs/class.stub
file to your liking =)
Installation
You can install the package via composer:
composer require iak/make-class --dev
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.