mmartinjoo / junior
Junior is a Laravel artisan command that writes code for you
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mmartinjoo/junior
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
README
Junior is a Laravel artisan command that writes code for you
- Install the package as a
devdependency:
composer require mmartinjoo/junior --dev
- Publish the configuration file:
php artisan vendor:publish --provider="Mmartinjoo\Junior\JuniorServiceProvider"
- Register at Junior.dev
- Create an API key
- Add the API key to your
.envfile:
JUNIOR_API_KEY=your-api-key
Usage
Junior can generate you basic CRUD code, including:
- Models
- Factories
- Migrations
- Controllers
- Resources
- Requests
- Tests
You need to run the following command:
php artisan junior make:crud
If you only need a model with migrations and factories, you can run:
php artisan junior make:model
If you only need a factory for an existing model, you can run:
php artisan junior make:factory
Junior will create the new files in the standard Laravel folders such as app/Models/MyModel.php or app/Http/Controllers/MyController.php. At the moment, it doesn't work with custom structures, so you need to manually move the generated files.