mmartinjoo/junior

This package is abandoned and no longer maintained. No replacement package was suggested.

Junior is a Laravel artisan command that writes code for you

0.1.4 2024-02-27 14:09 UTC

This package is auto-updated.

Last update: 2024-03-27 14:21:52 UTC


README

Junior is a Laravel artisan command that writes code for you

  1. Install the package as a dev dependency:
composer require mmartinjoo/junior --dev
  1. Publish the configuration file:
php artisan vendor:publish --provider="Mmartinjoo\Junior\JuniorServiceProvider"
  1. Register at Junior.dev
  2. Create an API key
  3. Add the API key to your .env file:
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.