broqit / laravel-reactions

Laravel Reactions Package
GNU General Public License v2.0
1 stars 0 forks source link

Undefined array key "like" #1

Open danpalmieri opened 2 weeks ago

danpalmieri commented 2 weeks ago

I just followed the instructions and I'm getting "Undefined array key "like"" error.

danpalmieri commented 2 weeks ago

I changed reaction-button.blade.php and now is working.

from

@if($reactionCounts[$reaction['type']])
<span>{{ $reactionCounts[$reaction['type']]}}</span>
@endif

to

@isset($reactionCounts[$reaction['type']])
<span>{{ $reactionCounts[$reaction['type']]}}</span>
@endisset
broqit commented 2 weeks ago

It seems that you might have pulled an older version of the repository in your composer. I recommend explicitly specifying version broqit/laravel-reactions 0.1.8 in your composer.json file to avoid the “undefined array key” issue.