1. Go to this page and download the library: Download kerrialn/indoctrinate 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/ */
kerrialn / indoctrinate example snippets
use Indoctrinate\Config\IndoctrinateConfig;
return static function (IndoctrinateConfig $config): void {
$config->connection(
driver: 'mysql',
host: '127.0.0.1',
port: 3306,
dbname: 'your_database',
user: 'your_user',
password: 'your_password',
);
// Register individual rules, optionally with a constraint to configure them:
$config->rules([
EnsureAutoIncrementPrimaryKeyRule::class => new EnsureAutoIncrementPrimaryKeyRuleConstraints(
skipTableLike: ['%session%', '%cache%', '%temp%', '%tmp%'],
),
]);
// Or register a curated set of rules:
// $config->sets([DoctrineCompatibilitySet::class]);
};