PHPackages                             muffin/webservice - 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. muffin/webservice

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

muffin/webservice
=================

Simplistic webservices for CakePHP

3.0.0(4y ago)88191.0k—7.3%41[3 issues](https://github.com/UseMuffin/Webservice/issues)[4 PRs](https://github.com/UseMuffin/Webservice/pulls)13MITPHP

Since Sep 17Pushed 2y ago10 watchersCompare

[ Source](https://github.com/UseMuffin/Webservice)[ Packagist](https://packagist.org/packages/muffin/webservice)[ Docs](https://github.com/usemuffin/webservice)[ RSS](/packages/muffin-webservice/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (26)Used By (13)

Webservice
==========

[](#webservice)

[![Build Status](https://camo.githubusercontent.com/cbd376e67801ea603cf2c7cf5a27d36cb3edaaba4c3730c227d3978f8335ec46/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5573654d756666696e2f576562736572766963652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/UseMuffin/Webservice/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage](https://camo.githubusercontent.com/1131173b1a87c32309acbe17cf1d3099232edcb33b7f0c35e26683fc132c06b8/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f5573654d756666696e2f576562736572766963652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/github/UseMuffin/Webservice)[![Total Downloads](https://camo.githubusercontent.com/3d6bb0a72412daf021fb5f9b228f9fcec4a45efc2dbe67d7aa36c353a0fcbcd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d756666696e2f776562736572766963652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muffin/webservice)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Bringing the power of the CakePHP ORM to your favourite webservices.

Install
-------

[](#install)

Using [Composer](http://getcomposer.org):

```
composer require muffin/webservice

```

You then need to load the plugin. You can use the shell command:

```
bin/cake plugin load Muffin/Webservice

```

Usage
-----

[](#usage)

### Datasource Configuration

[](#datasource-configuration)

In your `app.php`, add a new `webservice` config under `Datasources`:

```
    'Datasources' => [
        // Other db config here
        'webservice' => [
            'className' => \Muffin\Webservice\Datasource\Connection::class,
            'service' => 'Articles',
            // Any additional keys will be set as Driver's config.
        ],
    ],
```

If you are making a plugin then conventionally the datasource config key name should be underscored version of plugin name.

### As an ORM

[](#as-an-orm)

#### Create driver

[](#create-driver)

```
