1. Go to this page and download the library: Download joeymckenzie/sqlighter 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/ */
joeymckenzie / sqlighter example snippets
return [
// Enable/disable automatic backups
'enabled' => env('SQLIGHTER_ENABLED', true),
// Hours between backups
'frequency' => env('SQLIGHTER_FREQUENCY', 3),
// SQLite database filename
'database' => env('SQLIGHTER_DATABASE', 'database.sqlite'),
// How many backup copies to maintain
'copies_to_maintain' => env('SQLIGHTER_COPIES', 5),
// Where to store backups (relative to database directory)
'storage_folder' => env('SQLIGHTER_STORAGE', 'backups/'),
// Prefix for backup files
'file_prefix' => env('SQLIGHTER_PREFIX', 'backup'),
];
return [
// Using hour intervals
'frequency' => 1, // Every hour
'frequency' => 12, // Every 12 hours
'frequency' => 24, // Daily
'frequency' => 168, // Weekly
// Or using cron expressions
'frequency' => '0 * * * *', // Every hour
'frequency' => '0 */12 * * *', // Every 12 hours
'frequency' => '0 0 * * *', // Daily at midnight
'frequency' => '0 0 * * 0', // Weekly on Sunday at midnight
'frequency' => '30 2 * * *', // Daily at 2:30 AM
];