Skip to content

Blueprint Macro: Identifier Replacement

Nasrul Hazim Bin Mohamad edited this page Jun 14, 2018 · 1 revision

Other than default id as identifier of a record, you can use other options like the following:

Hashslug

Create a unique string with length of 64.

$table->hashslug();
$table->hashslug(128); // 128 characters of hashslug

UUID

$table->uuid();
$table->uuid(32); // 32 characters of uuid

Slug

Similar to WordPress Slug. Useful for tagging, or create sluggable URL

$table->slug();
Clone this wiki locally