PHP code example of nsrosenqvist / soma-database

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

    

nsrosenqvist / soma-database example snippets


 return [
    'default' => 'sqlite',
    'connections' => [
        'sqlite' => [
            'driver' => 'sqlite',
            'database' => get_path('storage').'/database.sqlite',
            'prefix' => '',
            'foreign_key_constraints' => true,
        ],
        'auth' => [
            'driver' => 'sqlite',
            'database' => get_path('storage').'/auth.sqlite',
            'prefix' => '',
            'foreign_key_constraints' => true,
        ],
    ],
];