PHP code example of patabugen / laravel-mssql-changes
1. Go to this page and download the library: Download patabugen/laravel-mssql-changes 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/ */
patabugen / laravel-mssql-changes example snippets
use Patabugen\MssqlChanges\Actions\ListTableChanges;
use Patabugen\SqlChanges\Table;
use Patabugen\SqlChanges\Change;
$table = Table::create('Contacts');
/** @var Illuminate\Support\Collection $changes */
$changes = ListTableChanges::handle($table);
$changes->each(function(Change $change) {
var_dump($change->toArray();
});
use Patabugen\MssqlChanges\Actions\ListTableChanges;
use Patabugen\SqlChanges\Table;
use Patabugen\SqlChanges\Change;
$table = Table::create('Contacts');
/** @var Illuminate\Support\Collection $changes */
$changes = ListTableChanges::make()
->fromVersion(100)
->toVersion(200)
->handle($table);
$changes->each(function(Change $change) {
var_dump($change->toArray();
});