PHP code example of mcred / phpred

1. Go to this page and download the library: Download mcred/phpred library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mcred / phpred example snippets



class MyClass extends \PHPRed\Models\Model
{
    public function __construct(\MysqliDb $mysql)
    {
        $this->model = 'MyClass';
        $this->table = 'my_class';
        $this->primaryKey = 'id';
        $this->foreignKey = 'my_class_id';
        $this->fields = ['id', 'name'];
        $this->