Skip to content

Commit

Permalink
Editing Count to support higher version of php
Browse files Browse the repository at this point in the history
  • Loading branch information
elbakly authored Sep 30, 2018
1 parent 16ca083 commit 65b9c7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/messenger.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

<div class="panel-body">
<div class="messenger">
@if (count($messages) === 20)
@if( is_array($messages) )
@if (count($messages) === 20)
<div id="messages-preloader"></div>
@endif

<div id="messages-preloader"></div>
@else
<p class="start-conv">Conversation started</p>
Expand Down Expand Up @@ -60,7 +64,7 @@
<script type="text/javascript">
var withId = {{$withUser->id}},
authId = {{auth()->id()}},
messagesCount = {{count($messages)}};
messagesCount = {{is_array($messages) ? count($messages) : '0'}};
pusher = new Pusher('{{config('messenger.pusher.app_key')}}', {
cluster: '{{config('messenger.pusher.options.cluster')}}'
});
Expand Down

0 comments on commit 65b9c7e

Please sign in to comment.