iak/make-class

A package to create basic classes with tests in your Laravel app

v1.0.0.0 2021-08-28 20:21 UTC

This package is auto-updated.

Last update: 2024-10-29 06:25:12 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.