Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 13, 20231 yr You are using a hard-coded column name: /** * Get the database column which stores the topic ID * * @return string */ public static function topicIdColumn() { return 'topicid'; } Can't you use a mapped column from the model to avoid changing files and templates? That happens in apps that uses topics released before the trait.
April 13, 20231 yr Solution Classes using the trait can overload the method if the column name does not match - in this case, the trait is simply providing a default value. Using mapped() would not work, because the "topic" column isn't actually included in the $databaseColumnMap property.