Using a UUID as primary key with Laravel 5

后端 未结 4 1542
余生分开走
余生分开走 2021-01-03 07:27

I\'m trying to create tables that will have a primary key which is a UUID defined as binary(16) instead of the default auto-incrementing id field.<

4条回答
  •  遥遥无期
    2021-01-03 07:49

    also try use this package will automatically generate and assign UUID field in your model, also can show and update by UUIDs key.

    https://github.com/EmadAdly/laravel-uuid

提交回复
热议问题