PHPackages                             arrilot/laravel-api-generator - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. arrilot/laravel-api-generator

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

arrilot/laravel-api-generator
=============================

Two simple tools for building REST APIs with fractal: console generator and API skeleton

1.1.3(7y ago)5016.3k↓50%18MITPHPPHP &gt;=5.4.0

Since May 24Pushed 6y ago6 watchersCompare

[ Source](https://github.com/arrilot/laravel-api-generator)[ Packagist](https://packagist.org/packages/arrilot/laravel-api-generator)[ Docs](https://github.com/Arrilot/laravel-api-generator)[ RSS](/packages/arrilot-laravel-api-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/c4ab0e210ae0c3aeb23fe9d13d861bd22345a0ee07253a4b38a3610119575a7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f417272696c6f742f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c6174)](https://packagist.org/packages/Arrilot/laravel-api-generator)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/5fd1ee2b841e65234138cf5352535a0ae76a3d6025824d029bd38c24c1af465b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f417272696c6f742f6c61726176656c2d6170692d67656e657261746f722f6d61737465722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/Arrilot/laravel-api-generator/)[![MIT License](https://camo.githubusercontent.com/a00b5d032b8e7114c9760cc0f0c6ca0373988c209223ceeaa5455f7c52e90800/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f417272696c6f742f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c6174)](https://packagist.org/packages/Arrilot/laravel-api-generator)

Laravel Api Generator (No longer supported)
===========================================

[](#laravel-api-generator-no-longer-supported)

*Two simple tools for building REST APIs with fractal: console generator and API skeleton*

Introduction
------------

[](#introduction)

This package provides two features

1. Console generator which creates Controller, Fractal Transformer and routes in a single command.
2. Basic REST API skeleton that can be really helpful if you need something standard. It's 100% optional.

If you do not use Fractal for your transformation layer, this package is probably not the right choice for you.

Installation
------------

[](#installation)

1. Run `composer require arrilot/laravel-api-generator`
2. Register a service provider in the `app.php` configuration file

```

```

3. Copy basic folder structure to app/Api `cp -R vendor/arrilot/laravel-api-generator/templates/Api app/Api` and check what you got there. If you need you can use different paths later.

Usage
-----

[](#usage)

### Generator

[](#generator)

The only console command that is added is `artisan make:api `.

Imagine you need to create a rest api to list/create/update etc users from users table. To achieve that you need to do lots of boilerplate operations - create controller, transformer, set up needed routes.

`php artisan make:api User` does all the work for you.

1. You may have noticed that after installation you already have a routes file `app/Api/routes.php` which looks like that:

```
