PHP code example of pittacusw / database

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

    

pittacusw / database example snippets


public function run()
{
    #iseed_start
    #iseed_end
}
bash
php artisan iseed users
php artisan iseed users,posts --force
php artisan iseed users --exclude=password,remember_token --orderby=id --direction=DESC
php artisan iseed audit_logs --max=1000 --chunksize=250 --dumpauto=0
bash
php artisan db:iseed
php artisan db:iseed users
php artisan db:iseed --database=legacy --chunksize=100
bash
php artisan db:backup
php artisan db:backup --database=legacy --path=storage/backups/sql
php artisan db:backup --mysqldump-binary="C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump.exe"
bash
php artisan db:restore
php artisan db:restore --database=legacy --path=storage/backups/sql
php artisan db:restore --mysql-binary="C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe"