cwssrl / eloquent-lumen-generator by cwssrl

Eloquent Lumen Generator
107
10
8
Package Data
Maintainer Username: cwssrl
Maintainer Contact: samuele.salvatico.social@gmail.com (Samuele Salvatico)
Package Create Date: 2019-09-25
Package Last Update: 2020-01-26
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-03-28 03:10:27
Package Statistics
Total Downloads: 107
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 10
Total Watchers: 8
Total Forks: 0
Total Open Issues: 0

Eloquent Lumen Generator

Eloquent Lumen Generator is a tool based on Code Generator for generating Eloquent models. It comes with the possibility to generate the following items:

  • Model;
  • Repository and Contracts, binding them into the bootstrap/app.php file;
  • Api Controller;
  • Routes;
  • Resources;
  • Translation management for tables.

Installation

Step 1. Add Eloquent Lumen Generator to your project:

composer require cwssrl/eloquent-lumen-generator --dev

Step 2. Register GeneratorServiceProvider in bootstrap/app.php file:

$app->register(Cws\EloquentModelGenerator\Provider\GeneratorServiceProvider::class);

Step 3. Uncomment AppServiceProvider in bootstrap/app.php file:

Step 4 (optional). If you want to edit package configurations, you have to copy vendor/cwssrl/eloquent-lumen-generator/src/Resources/eloquent_model_generator.php into your config folder.

Usage

Use

php artisan cws:generate Book --all

to generate all you need for the Book class. Generator will look for table with name books and generate the model, the repo, the contract, the controller, the routes for it.

You can also generate data for all your tables at once

php artisan cws:generate all --all

The docs are not finished, I will write them as soon as possible