PHP code example of v3knet / module

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

    

v3knet / module example snippets


return [
    // …
    'modules' => [
        'my_module' => 'MyModule',
        'system'    => 'atsilex\module\system\SystemModule', # Can't disable
    ],
    // …
];

# SQlite
# $db_options = ['driver' => 'pdo_sqlite',  'path' => '/alternative/path/to/app.db'];

# MySQL
$db_options = [
    'driver'    => 'pdo_mysql',
    'host'      => 'mysql_write.someplace.tld',
    'dbname'    => 'my_database',
    'user'      => 'my_username',
    'password'  => 'my_password',
    'charset'   => 'utf8mb4',
];

return [
 // …
 'db.options' => $db_options,
 // …
];