PHP code example of omegamvc / omega

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

    

omegamvc / omega example snippets


return [
    'default'  => env('CACHE_DRIVER', 'file'),
    'memory'   => [
        'type'    => 'memory',
        'seconds' => env('CACHE_SECONDS', '31536000'),
    ],
    'file'     => [
        'type'    => 'file',
        'seconds' => env('CACHE_SECONDS', '31536000'),
        'path'    => Path::getPath('storage','framework/data/cache'),
    ],
    'memcache' => [
        'type'    => 'memcache',
        'host'    => env('MEMCACHE_HOST', '127.0.0.1'),
        'port'    => env('MEMCACHE_PORT', '11211'),
        'seconds' => env('CACHE_SECONDS', '31536000'),
    ],
];

'path' => Path::getPath('your_custom_cache_path', 'your_custom_cache_dir')

return [
    'default' => env('DB_CONNECTION', 'mysql'),

    'mysql'   => [
        'type'     => 'mysql',
        'host'     => env('DB_HOST', '127.0.0.1'),
        'port'     => env('DB_PORT', '3306'),
        'database' => env('DB_DATABASE', 'omega'),
        'username' => env('DB_USERNAME', 'root'),
        'password' => env('DB_PASSWORD', 'vb65ty4'),
    ],
    'sqlite'  => [
        'type' => 'sqlite',
        'path' => Path::getPath('database', 'sqlite/database.sqlite'),
    ],
];

use Omega\Support\Path;

'path' => Path::getPath('yout_custom_databae__path', 'your_custom_sqlite_path/database.sqlite')
sh
// File name: /etc/php/your_php_version/mods_available/xdebug.ini

zend_extension=xdebug.so       
xdebug.show_exception_trace=0
xdebug.mode=coverage
zend_assertion=1
assert.exception=1
sh
php omega serve