mitakeck / ulidtypes
UlidType plugin for CakePHP
v0.0.2
2019-10-01 07:09 UTC
Requires
- cakephp/cakephp: ^3.5
- robinvdvleuten/ulid: ^4.0
Requires (Dev)
- phpunit/phpunit: ^5.7.14|^6.0
This package is auto-updated.
Last update: 2026-03-01 00:29:12 UTC
README
Setup
Install
$ composer require mitakeck/ulidtypes
Bootstrap
- add plugin load command in
config/bootstrap.php
... Plugin::load('mitakeck/UlidTypes', ['bootstrap' => true]); ...
Model
- add
_initializeSchema()method toModel\Tableclass to make idulidtype
... 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; } } ...