Skip to content

Data type problem in subject_id and causer_id #932

Answered by Gummibeer
yangshengjie4u asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
yes it makes things A LOT easier if all your PKs have the same type. You can change the causer and subject relationship columns in the published package migration.

$table->nullableMorphs('subject', 'subject');
$table->nullableMorphs('causer', 'causer');

Instead of nullableMorph() there should also be a nullableUuidMorph() or something like that.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@colinmackinlay
Comment options

@Gummibeer
Comment options

@colinmackinlay
Comment options

@Gummibeer
Comment options

Answer selected by yangshengjie4u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants