PHP code example of pomm-project / pomm-module

1. Go to this page and download the library: Download pomm-project/pomm-module 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/ */

    

pomm-project / pomm-module example snippets


return array(
    'pomm' => array(
        'databases' => array(
            'con1' => array (
                // Mandatory data source name
                'dsn'  => 'pgsql://postgres:[email protected]/myschema',
                // Optional session builder overload
                'class:session_builder' => '\Database\ModelManager\SessionBuilder',
            ),
        ),
    ),
);

# Generate the "people" model for "organization" schema
vendor/bin/pomm.php generate-model pstudio2 organization people --force

# Generate the "people" structure for "organization" schema
vendor/bin/pomm.php generate-structure pstudio2 organization people

# Generate the "people" relation for "organization" schema
vendor/bin/pomm.php generate-entity pstudio2 organization people --force