probonolabs/laravel-api-generator

Laravel command which rapidly creates single file controllers, requests and resources

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/probonolabs/laravel-api-generator

v1.0.5 2021-02-01 19:06 UTC

This package is auto-updated.

Last update: 2025-10-04 18:07:11 UTC


README

Total Downloads Latest Stable Version License

This package contains one single command: php artisan make:api {name} which creates a complete CRUD resource.

Each CRUD resource contains:

  • Single Action Controller: Index, Get, Create, Update and Delete
  • Custom request for each controller
  • Custom resource
  • Model and migration
  • Routes

Publish this package config if you want to change the base controller, request, resource or add default route middleware.

Installation

You can install the package via composer:

composer require probonolabs/laravel-api-generator --dev

Usage

You can create an API resource by using this command:

php artisan make:api Student

Create a nested API resource by using this command:

php artisan make:api Student/Training

Optional provide --routes to append CRUD routes in your api.php file

php artisan make:api Student --routes

License

The MIT License (MIT). Please see License File for more information.