PHP code example of basteyy / medoo-orm

1. Go to this page and download the library: Download basteyy/medoo-orm 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/ */

    

basteyy / medoo-orm example snippets


$config = []; // Config 
$medoo = new \Medoo\Medoo($config);
$usersTable = new UsersTable($medoo);

$DI->addDefinitions([
    \Medoo\Medoo::class => function () {
        $config = []; // Config 
        return new \Medoo\Medoo($config);
    }, 
    // OR (!!)
    'connection' =>  => function () {
        $config = []; // Config 
        return new \Medoo\Medoo($config);
    }, 
    // OR (!!) 
    'DB' =>  => function () {
        $config = []; // Config 
        return new \Medoo\Medoo($config);
    },  
    // OR (!!)
    'DatabaseConnection' =>  => function () {
        $config = []; // Config 
        return new \Medoo\Medoo($config);
    }
]);

$config = []; // The Config
$usersTable = new FancyTableClassTable($config);