Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 608 Bytes

peculiar.md

File metadata and controls

26 lines (20 loc) · 608 Bytes

PECULIAR IDs

Table Of Contents

Peculiar Identifiers are a way to generate unique 64-bit ids to server as primary or unique keys.

class Book extends Model {

    public $uid;
    public $title;

    public static function schema(){
        return [
            'uid' => Field::Peculiar(),

            'title' => Field::CharField(function(Column $column){
                $column->size = 255;
                $column->null = true;
            })
        ];
    }
}

Previous Part : Defaults | Next Part : UUIDs