#69

Product support

Get help in the plugin support forum.

Categories

  • Developer Tools
  • Utility

API Generator is plugin to build RESTful APIs. See the demo here https://youtu.be/WketEhx-xSQ

Features

  • Auto generate routes
  • Auto Generate Controller (CRUD)
  • Support relationship restful API

Demo Video

These plugin(s) are required for the plugin:

form create data

Requirement

Form

  • API Name : Name of your API module
  • Base Endpoint : Base endpoint of your API, ex : api/v1/modulename
  • Short Description : Describe your API
  • Model : select model that will be created API
  • Custom Condition : Build customer response using JSON modeling

Custom Condition Example

{
    'fillable': 'id,title,content',
    'relation': [{
        'name': 'user',
        'fillable': 'id,first_name'
    }, {
        'name': 'categories',
        'fillable': 'id,name
    }]
}

* please replace single quote with quote

  • Found the plugin useful on 17 Oct, 2017

    Hi!

    When I create 2 or more endpoints of 2 or more different models, they stop working except the last one. The first return a 404 error. Do you know why?

    Regards

  • Found the plugin not useful on 5 Oct, 2017

    Hi,

    Could you please help me how to send POST or DELETE request to the API generated by this plugin?
    GET request works fine but when I try to post or delete data I receive 404 error message.

    Thank you,
    Cb

  • author

    Replied on 5 Oct, 2017

    Hello, thanks for review

    Please check your routes list in CLI, you can use php artisan route:list and try to request to available route. Careful with the method you are using when requesting. If you found error when delete data, please update your plugin to latest version. Hope you enjoying this plugin.

  • Found the plugin useful on 30 Aug, 2017

    Nice plugin, one question, what would be the best way to implement JWT or some other kind of authentication before API usage?

  • author

    Replied on 31 Aug, 2017

    I have never tried it, but you can try this one : https://luketowers.ca/blog/how-to-use-laravel-packages-in-october-cms-plugins/

    You can try to use JWT auth in API Generator. Thank you

  • Found the plugin useful on 28 Aug, 2017

    I installed and created an api endpoint, but always get this error:

    Class AhmadFatoni\ApiGenerator\Controllers\API\booksController does not exist /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php line 741

    I checked the generated source code there is such file: [email protected]:/data/webroot/october/src/plugins/ahmadfatoni/apigenerator$ ls controllers/API/ booksController.php readme.txt

  • author

    Replied on 28 Aug, 2017

    Please update your API Generator. Thanks

  • Found the plugin useful on 4 Jun, 2017

    how can you make it without Set-Cookie in the header? Thanks

  • author

    Replied on 6 Jun, 2017

    What do you mean "Set-Cookie in the header" ?

  • Found the plugin useful on 27 Mar, 2017

    Just started to use it. Nice plugin! Simple and effective. Thanks Ahmad. BTW, please check pull request I sent you with some fix for custom backend url.

  • author

    Replied on 29 Mar, 2017

    Thanks, I has been approved your pull request

  • Found the plugin useful on 31 Jan, 2017

    Thanks for very useful plugin. How to combine two models.

  • author

    Replied on 1 Feb, 2017

    Thanks, You can use "custom condition" feature. You can see an example in the documentation.

  • Found the plugin useful on 29 Jan, 2017

    does it support POST methods?

  • author

    Replied on 29 Jan, 2017

    Yes, its support post method

  • Found the plugin useful on 26 Dec, 2016

    Very useful plugin :*

1.0.5

fixing bug on request delete data

Oct 05, 2017

1.0.4

fixing bug on PHP 7

Aug 28, 2017

1.0.3

add builder plugin on requirements

Apr 10, 2017

1.0.2

Created table ahmadfatoni_apigenerator_data

Nov 30, 2016

1.0.1

Initialize plugin.

Nov 30, 2016