PHPackages                             baka/database - 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. baka/database

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

baka/database
=============

Baka Databse component

v0.5.3.2(5y ago)18.0k1[2 issues](https://github.com/bakaphp/database/issues)4MITPHPPHP &gt;=7.2

Since Nov 25Pushed 5y ago6 watchersCompare

[ Source](https://github.com/bakaphp/database)[ Packagist](https://packagist.org/packages/baka/database)[ RSS](/packages/baka-database/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (8)Versions (17)Used By (4)

Baka Database
=============

[](#baka-database)

Baka Database

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/984e27df7e28cc62b62ef7dcc72091c74e4ec248d11a09e870fe170415d128ca/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616b617068702f64617461626173652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bakaphp/database/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/72e4b2d6b1fb849a90e677ccc8f02ceabf061be442b0e0c5cb84e3c36ca280aa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616b617068702f64617461626173652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bakaphp/database/?branch=master)[![Build Status](https://camo.githubusercontent.com/e30f243f2c6d72dd808aee43e533cba2563ca9b1b4b9733536596a72520b88e2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62616b617068702f64617461626173652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bakaphp/database/build-status/master)

Model
=====

[](#model)

The default behavior of the baka model is giving you the normal functions to work with any mc project

- automatic updated\_at , created\_at times
- soft delete by just calling softDelete() insted of delete()
- toFullArray() instead of toArray() to avoid dynamic fields on your model been removed by phalcon serialization
- Custom Fields Trait and CLI
- Hash Table Traits for dynamic atributes

Custom Fields Model
===================

[](#custom-fields-model)

One of the things we look for is a table that growth in a vertical way instead of horizontal . We made custom fields to avoid having to go later on in proyect and having to add new fields to the table, with this we can managed them dynamicly and later on add UI for the client to better manage the info

To create a custom fields table from a module you will need to use our CLI

To use you need your model to extend from ModelCustomFields

```
