PHPackages                             appkita/ci4restfull-starter - 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. [Database &amp; ORM](/categories/database)
4. /
5. appkita/ci4restfull-starter

ActiveProject[Database &amp; ORM](/categories/database)

appkita/ci4restfull-starter
===========================

CodeIgniter4 starter Restfull API

1.0.1(5y ago)18989MITPHPPHP ^7.3||^8.0

Since May 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gunantos/ci4restfull-starter)[ Packagist](https://packagist.org/packages/appkita/ci4restfull-starter)[ Docs](https://app-kita.com)[ RSS](/packages/appkita-ci4restfull-starter/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/57587246441d07c3ab257eedac62a1936f24ec126b634bdf27af9938c872c06f/68747470733a2f2f6170702d6b6974612e636f6d2f696d672f6c6f676f2d74656b732e39363564323462662e706e67)](https://app-kita.com)
[![PHP Composer](https://github.com/gunantos/ci4restfull-starter/actions/workflows/php.yml/badge.svg)](https://github.com/gunantos/ci4restfull-starter/actions/workflows/php.yml)[![Discord](https://camo.githubusercontent.com/84139f236ed24ffc8f4c6fc45485801bc437ebbdf189a2c1686278b39cc78fc2/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3834363033363932303831313132363834343f7374796c653d706c6173746963)](https://camo.githubusercontent.com/84139f236ed24ffc8f4c6fc45485801bc437ebbdf189a2c1686278b39cc78fc2/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3834363033363932303831313132363834343f7374796c653d706c6173746963)[![GitHub issues](https://camo.githubusercontent.com/a8147c52476412aa91a61c7e2caad55185e6d09adbbb5bf575c85d8f504803c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f67756e616e746f732f6369347265737466756c6c2d73746172746572)](https://github.com/gunantos/ci4restfull-starter/issues)[![GitHub license](https://camo.githubusercontent.com/ad4207ef44df86fc0a9f741b24938d97fcc8abcb4c4ff68db82a1f1b9d4d2576/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f67756e616e746f732f6369347265737466756c6c2d73746172746572)](https://github.com/gunantos/ci4restfull-starter/blob/main/LICENSE)
[![](https://camo.githubusercontent.com/c1533754910d219fca84532dd6b2f19dda3ea0634eabea9f01b277bbd9f09c8e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f67756e616e746f733f6c6f676f3d67756e616e746f73267374796c653d666f722d7468652d6261646765 "Pay Coffe")](https://sponsor.app-kita.net)

CodeIgniter 4 Restfull API Application Starter
==============================================

[](#codeigniter-4-restfull-api-application-starter)

Codeigniter 4 Restfull is the creation of Restfull API with the codeigniter 4 framework. Use is very simple and easy to use. And support with 4 types of security authentication ex. JWT, Basic, Key, Token

You can manage api using database or File configuration

follow Setup Configuration!

Chat
----

[](#chat)

[Discord](https://discord.gg/bXUWCSaw)

Installation &amp; updates
--------------------------

[](#installation--updates)

- composer

```
composer create-project appkita/ci4restfull-starter
cd ci4restfull-starter
composer update
```

-manual

1. Download latest release from `https://github.com/gunantos/ci4restfull-starter/releases`
2. extract to public\_html
3. `composer install`

Setup
-----

[](#setup)

- Copy `env` to `.env` and tailor for your app, specifically the baseURL, any database settings and Restfull setting.

`or`

- Open Folder `App/Config/Restfull` and edit

```
   //you can set database of file
   public $cekfrom = 'file'

   //configuration user cek
  public $user_config = [
      'model' => 'UserModel', //model name or parameter if you using file
      'username_coloumn'=>'email',
      'password_coloumn'=>'password',
      'key_coloumn' => 'apikey',
      'path_coloumn'=>'path',
      'block_coloumn'=>'isblock',
      'whitelist_coloumn'=>'whitelist',
      'blacklist_coloumn'=>'blacklist'
    ];

    //if you using file $cekfrom
    $UserModel = [
   	[
        'email'=>'user@email.com',
        'password'=>'password',
        'apikey'=>'123123',
        'isblock'=>false,  //if you block return true
        'whitelist'=>[], //add whitelist ip address
        'blacklist'=>[], //add blacklist ip address
        'path'=>'*' //use * for allow all access or array controllername_methodname
      ]
     ]

    //Configuration your Header API KEY
    public $haderKey = 'X-API-KEY';

    /**
     * @var array $allowed_key_parameter
     * if you API KEY allowed get from parameter GET, POST, or JSON
     */
    public $allowed_key_parameter = ['get', 'post', 'json'];
    //configuration data include on json token
   $token_data = 'username';

   public $allowed_format = ['json', 'xml', 'csv'];

    /**
     * @var string $default_format
     */
    public $default_format = 'json';
```

- Create new Controller extends `RestfullApi`

```
