PHPackages                             osemk/php-custom-model - 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. osemk/php-custom-model

ActiveLibrary

osemk/php-custom-model
======================

PHP CustomModel let's you to convert your MYSQL table automaticly to a PHP Model

v1.2(2y ago)09MITPHPPHP ^7.3

Since Dec 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/osemk/PHPCustomModel)[ Packagist](https://packagist.org/packages/osemk/php-custom-model)[ RSS](/packages/osemk-php-custom-model/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

PHPCustomModel
==============

[](#phpcustommodel)

PHPCustomModel let's you to convert your MYSQL database tables to a PHP Model automaticly. This library uses mysqli to connect and to request database.

FAQ
---

[](#faq)

1. Can I run PHPCustomModel for all MYSQL tables?
    - I tried to adopt it to use for all MYSQL tables but it can gives error with tables with non-PRI keys or tables has less identifier columns.

Getting Started
---------------

[](#getting-started)

Before you start using this Library, you **need** to know how PHP works, you need to know how MYSQL work and what is Models. This is a fundamental requirement before you start. Without this knowledge, you will only suffer.

### Requirements

[](#requirements)

- [PHP 7.3](https://php.net) or higher
- [`mysqli`](https://www.php.net/manual/tr/book.mysqli.php)

### Installing PHPCustomModel

[](#installing-phpcustommodel)

PHPCustomModel is installed using [Composer](https://getcomposer.org).

1. Run `composer require osemk/php-custom-model`. This will install the latest stable release.
2. Include the Composer autoload file at the top of your main file:
    - `include __DIR__.'/vendor/autoload.php';`
3. Make models!

### Basic Example

[](#basic-example)

```
