6 months ago

Laravel Pusher not working again

Posted 6 months ago by BossPogs

Hello. My pusher is not working again but when I check in the Pusher dashboard it is working. I try the php artisan config:clear but it is not working again.


<div class="col-md-12">
                <form id="form-data" class="form-horizontal" method="POST" action="updatecall">
                    {{ csrf_field() }}
                    <div class="table-responsive">
                        <table class="table table-bordered" id="example" width="100%" cellspacing="0">
                                @if($callid === null)
                                <input type="hidden" class="form-control" id="google/cloud-text-to-speech" name="call_id" value="{{ $callid->id }}" readonly>
                                <td><label>Probably Next Call</td>
                                <td><span id="letter">{{ $callid->letter }}</span>-<span id="number">{{ $callid->number }}</span></td>
                                    <button type="submit" class="btn btn-success btn-fill pull-right" id="update" float:right>
                                        CALL NEXT

$(document).ready(function() {
    // Enable pusher logging - don't include this in production
    Pusher.logToConsole = true;

    var pusher = new Pusher('586c6fb979ff3d2ad3b1', {
      cluster: 'ap1',
      forceTLS: true

    var channel = pusher.subscribe('my-channel');
    channel.bind('my-event', function(data) {

    }); //code that's not working



public function store(Request $request)
        //query sa pag get counter gamita ang assignments
        $counter_id = Assignment::where('user_id', Auth::user()->id)

        $called = Call::find($request->input('call_id'));
        $called->user_id = Auth::user()->id;
        $called->counter_id = $counter_id->counter_id; 
        $called->called = 'YES';

        /*$office_id = Office::join('users', '', '=', 'users.office_id')
                    ->where('', Auth::user()->id)
        $office_id = User::where('id', Auth::user()->id)->first();
        $callid = Call::join('transactions', 'calls.trans_id', '=', '')
                ->join('offices', 'transactions.office_id', '=', '')
                ->where('calls.called', 'NO')
                ->where('', $office_id->office_id)

        if($callid != null)
            // pusher
            $options = array(
                'cluster' => 'ap1',
                'useTLS' => true

            $pusher = new Pusher(

            $data = ['letter' => $callid->letter, 'number' => $callid->number, 'id' => $callid->id]; // sending calls: letter, number, id aron magupdate siya
            $pusher->trigger('my-channel', 'my-event', $data);
        return redirect()->route('call.index')->with('success' , 'CALLED');

On the other the pusher is working but today I was shocked it was not working in my laravel project but when I check in the pusher dashboard, the pusher is working

Please sign in or create an account to participate in this conversation.