Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Adriano Faria Posted April 13, 2023 Posted April 13, 2023 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.
Solution Ryan Ashbrook Posted April 13, 2023 Solution Posted April 13, 2023 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. Adriano Faria 1
Recommended Posts