1. Go to this page and download the library: Download webrium/console 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/ */
webrium / console example snippets
use Foxdb\DB;
use Foxdb\Seeders\Seeder;
class UsersSeeder extends Seeder
{
public function run(): void
{
// DB::table('users')->insert([
// 'name' => 'Admin',
// 'email' => '[email protected]',
// ]);
// To call other seeders:
// $this->call(RolesSeeder::class);
}
}
bash
php webrium db <action> [<name>] [--use=<database>] [--force]
bash
php webrium db list
php webrium db tables --use=my_database
php webrium db create my_database
php webrium db drop my_database
php webrium db drop my_database --force