PHP code example of mitakeck / ulidtypes
1. Go to this page and download the library: Download mitakeck/ulidtypes 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/ */
mitakeck / ulidtypes example snippets
...
Plugin::load('mitakeck/UlidTypes', ['bootstrap' => true]);
...
...
use Cake\Database\Schema\TableSchema;
...
class XXXXXXXXTable extends Table
{
protected function _initializeSchema(TableSchema $table)
{
parent::_initializeSchema($table);
$table->setColumnType('id', 'ulid'); // set ulid type for id
return $table;
}
}
...