jornatf / laravel-trait-generator
A Laravel Package to make Trait with artisan CLI.
v1.0.0
2023-04-23 22:17 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-12-09 12:53:38 UTC
README
A Laravel Package to make Trait with artisan CLI.
If you like this package you can Buy me a Coffee ☕️
Installation
Via composer:
composer require jornatf/laravel-trait-generator
Usage
Via artisan CLI:
php artisan make:trait Foo
The trait namespace is: App\Traits
.
Trait generated:
<?php namespace App\Traits; trait Foo { /** * Method description. * * @return string */ public function methodName() { return "Hello World"; } }
Import trait:
<?php namespace App\Http\Controllers; use App\Traits\Foo; use App\Http\Controllers\Controller; class PostController extends Controller { use Foo; // your controller methods HERE. }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Feel free to contribute to this project to improve with new features or fix bugs 👍
Credits
License
The MIT License (MIT).
Please see License File for more information.