Summer Sale! All accounts are 50% off this week.

PetroGromovo's avatar

how with fzaninotto/Faker fill ordering field?

Defining some data I wonder how with fzaninotto/Faker can I define unique value for ordering field, maybe like ordering= ID, with table definition :

    $table->smallIncrements('id')->unsigned();
      ...
    $table->smallInteger('ordering')->unsigned()->unique();

Thanks in advance!

0 likes
1 reply
tykus's avatar
tykus
Best Answer
Level 104

Do you intend to use this in the context of a Model Factory? Just use sequences

1 like

Please or to participate in this conversation.