We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, is there a way of creating uuid on pivot? on seeding, I'm getting General error: 1364 Field 'id' doesn't have a default value
General error: 1364 Field 'id' doesn't have a default value
my model is..
use GoldSpecDigital\LaravelEloquentUUID\Database\Eloquent\Model; class BoardPost extends Model { use Uuid; public $incrementing = false; protected $keyType = 'string'; protected $primaryKey = 'id'; public static function boot() { parent::boot(); self::creating(function ($model) { $uuid = (string) Uuid::generate(4); $model->id = $uuid; }); } }
The text was updated successfully, but these errors were encountered:
Hi @jayenne 👋
Please take a look at this comment - hopefully, it answers your question: #33 (comment)
Sorry, something went wrong.
@jayenne Did that help? I'll close this issue if so.
Closing due to no reply.
No branches or pull requests
hi,
is there a way of creating uuid on pivot?
on seeding, I'm getting
General error: 1364 Field 'id' doesn't have a default value
my model is..
The text was updated successfully, but these errors were encountered: