Custom UUID models not working on save
Missing required parameter for [Route: filament.admin.resources.tours.edit] [URI: admin/tours/{record}/edit] [Missing parameter: record].
Getting this error for any model I have with uuids. The IDs are generated by the DB tho so that might be it?
7 Replies
What is the uuid column name
id
keep in mind I do have
in the models
if you query the table with eloquent are the id attributes filled when the models are returned
yeye tables are working fine and viewing/editing the record
id field is not in fillable also
not sure, uuids work fine in my projects.
Just checked and everything is working fine.
What I need to change for
uuid
1. $table->uuid('id')->primary()
2. use HasUuids
trait in model
(optional)
3. $table->foreignUuid('column')
By following only 1 & 2, it's working as expected. Note that I don't put public $incrementing = false;
& protected $keyType = 'string';
in my model but maybe better to includeOkay, turns out I have to sleep more often
I somehow missed the
HasUuids
trait