birzha/plugins/ahmadfatoni/apigenerator
saparatayev 1ee9712556 show old approved posts too - api 2022-11-23 12:10:57 +05:00
..
controllers show old approved posts too - api 2022-11-23 12:10:57 +05:00
helpers added apigenerator plugin 2021-08-26 13:05:51 +05:00
lang/en added apigenerator plugin 2021-08-26 13:05:51 +05:00
models added apigenerator plugin 2021-08-26 13:05:51 +05:00
template bank info, types get without token in a separate class 2022-05-25 17:49:03 +05:00
updates added apigenerator plugin 2021-08-26 13:05:51 +05:00
Plugin.php added apigenerator plugin 2021-08-26 13:05:51 +05:00
Readme.md added apigenerator plugin 2021-08-26 13:05:51 +05:00
composer.json added apigenerator plugin 2021-08-26 13:05:51 +05:00
plugin.yaml commented ahmad fatoni 2022-02-07 16:00:04 +05:00
routes.php bank info, types get without token in a separate class 2022-05-25 17:49:03 +05:00

Readme.md

API Generator

October CMS plugin to build RESTful APIs.

Features

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

Install

composer require AhmadFatoni.ApiGenerator

Usage

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

Contribute

Pull Requests accepted.

Contact

You can communicate with me using linkedin

License

The OctoberCMS platform is open-sourced software licensed under the MIT license.