2323use Spatie \Tags \HasTags ;
2424
2525/**
26- * @property array $topic_tags
27- * @property array $programming_language_tags
26+ * @property array $topics_tags
27+ * @property array $programming_languages_tags
2828 * @property array $general_tags
2929 */
3030#[ObservedBy([ComputerScienceResourceObserver::class])]
@@ -54,9 +54,9 @@ class ComputerScienceResource extends Model
5454
5555 protected $ table = 'computer_science_resources ' ;
5656
57- protected $ guarded = ['topic_tags ' , 'programming_language_tags ' , 'general_tags ' ];
57+ protected $ guarded = ['topics_tags ' , 'programming_languages_tags ' , 'general_tags ' ];
5858
59- protected $ appends = ['topic_tags ' , 'programming_language_tags ' , 'general_tags ' , 'vote_score ' , 'user_vote ' , 'comments_count ' , 'image_url ' ];
59+ protected $ appends = ['topics_tags ' , 'programming_languages_tags ' , 'general_tags ' , 'vote_score ' , 'user_vote ' , 'comments_count ' , 'image_url ' ];
6060
6161 public function getActivitylogOptions (): LogOptions
6262 {
@@ -140,12 +140,12 @@ protected function difficulties(): Attribute
140140 /**
141141 * Accessor to get topic tags.
142142 */
143- protected function topicTags (): Attribute
143+ protected function topicsTags (): Attribute
144144 {
145145 return Attribute::make (
146146 get: fn () => $ this ->tagsWithType ('topics_tags ' )->pluck ('name ' )->toArray (),
147147 set: function (array $ value ) {
148- $ old_value = $ this ->topic_tags ;
148+ $ old_value = $ this ->topics_tags ;
149149 $ this ->syncTagsWithType ($ value , 'topics_tags ' );
150150 TagFrequencyChanged::dispatch ('topics_tags ' , $ old_value , $ value );
151151
@@ -157,12 +157,12 @@ protected function topicTags(): Attribute
157157 /**
158158 * Accessor to get programming language tags.
159159 */
160- protected function programmingLanguageTags (): Attribute
160+ protected function programmingLanguagesTags (): Attribute
161161 {
162162 return Attribute::make (
163163 get: fn () => $ this ->tagsWithType ('programming_languages_tags ' )->pluck ('name ' )->toArray (),
164164 set: function (array $ value ) {
165- $ old_value = $ this ->programming_language_tags ;
165+ $ old_value = $ this ->programming_languages_tags ;
166166 $ this ->syncTagsWithType ($ value , 'programming_languages_tags ' );
167167 TagFrequencyChanged::dispatch ('programming_languages_tags ' , $ old_value , $ value );
168168
0 commit comments