LaravelPackages.net
Acme Inc.
Toggle sidebar
phfoxer/apigenerate

Easy api generate for the Laravel Framework.

17.514
40
2.8.5
About phfoxer/apigenerate

phfoxer/apigenerate is a Laravel package for easy api generate for the laravel framework.. It currently has 40 GitHub stars and 17.514 downloads on Packagist (latest version 2.8.5). Install it with composer require phfoxer/apigenerate. Discover more Laravel packages by phfoxer or browse all Laravel packages to compare alternatives.

Last updated

phfoxer/apigenerate

API Rest generator for Laravel Framework. Create your api resource in seconds using only your database table name or connection name.

Installation

composer require phfoxer/apigenerate

Install the service provider:

// config/app.php
'providers' => [
    ...
    Phfoxer\ApiGenerate\ApiGenerateServiceProvider::class,
    ...
];

Usage

Creating a new resource

To create all API Rest resources run this command (Only postgres and mysql):

php artisan generate:api --con=conection_name

To create a new api resource run this command:

php artisan generate:api --table=table_name --relation=true

You can see result in http://localhost:8000/api/table_name You can find your new resource in app/RestAPI. General is the default

Params

To define route:

php artisan generate:api --table=table_name --route=my-custom-route --relation=true

To define module name:

php artisan generate:api --table=table_name --route=my-custom-route --relation=true

You can find your new resource in app/RestAPI/Exemple.

Postcardware

You are free to use this package as it's MIT-licensed

Star History Chart