> For the complete documentation index, see [llms.txt](https://sw-fw-less.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sw-fw-less.gitbook.io/project/mvc/model.md).

# Model

### MySQL Example

```
<?php

namespace App\models;

class Member extends AbstractMysqlModel
{
    protected static $table = 'member';
}

```

### Elasticsearch Example

```
<?php

namespace App\models;

class Test extends AbstractEsModel
{
    protected static $index = 'test';
    protected static $type = 'test';
}
G
```

### General Example

```
// Fetch property value from model object like fetching item from an array
echo $model['foo'];

// Json Encode Model Object
echo \App\components\Helper::jsonEncode($model);
```
