timwassenburg / laravel-artisan-extender
A collection of generators for Laravel
Requires
This package is auto-updated.
Last update: 2024-10-27 12:26:33 UTC
README
Table of Contents
Installation
Install the package with composer.
composer require timwassenburg/laravel-artisan-extender --dev
Usage
Generate services
To generate a new service use the following artisan command.
php artisan make:service UserService
Optionally, you can add multiple method names (seperated by comma) with the --methods
param.
php artisan make:service UserService --methods=register,login,logout
Learn more about the Service Generator
Generate actions
Run the following command on the command-line to generate a new action.
php artisan make:action {name}
Learn more about the Action Generator
Generate repositories
Run the following command.
php artisan make:repository UserRepository
This example will generate the following files:
app\Repositories\Eloquent\UserRepository app\Repositories\UserRepositoryInterface
Learn more about the Repository Generator
Generate traits
Run the following command on the command-line to generate a new trait.
php artisan make:trait {name}
Optionally, you can add multiple method names (seperated by comma) with the --methods
param.
Learn more about the Trait Generator
php artisan make:trait Notifiable --methods=notify,notifications
Generate pivot tables
Run the following command on the command-line to generate a new migration for the pivot table.
php artisan make:pivot {first_table_name} {second_table_name}
The command will create a new migration in database/migrations
. Run the migrations to create the table.
php artisan migrate
Learn more about the Pivot Table Generator
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
The MIT License (MIT). Please see License File for more information.