PHPackages                             riyastir/apigenerator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. riyastir/apigenerator

ActiveLibrary

riyastir/apigenerator
=====================

API Generator for Laravel 6

13PHPCI failing

Since Nov 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/riyastir/apigenerator)[ Packagist](https://packagist.org/packages/riyastir/apigenerator)[ RSS](/packages/riyastir-apigenerator/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

API Generator for Laravel 6.0 and above
=======================================

[](#api-generator-for-laravel-60-and-above)

Package to create API Controller and Route entry with one `Artisan` command.

For now we're starting with only one simple command and will expand functionality as needed. Please submit your suggestions in `Issues` section.

Installation and Usage
======================

[](#installation-and-usage)

1. Install the package via `composer require riyastir/apigenerator`
2. Add `Riyastir\Apigenerator\ApiGeneratorProvider::class` to your `config\app.php` providers.
3. That's it: run `php artisan make:api --model=XXXXX` where XXXXX is your model name.

This command will generate API Controller and new entry in `routes/api.php` file.

**Notice**: Model should exist already, our package won't create it.

**Example**

`php artisan make:api --model=Project`

Will generate the file **app\\Http\\Controllers\\Api\\ProjectsController.php**:

```
