laravel channel is not calling after changing auth end point
i,m developing chat system for teacher and student in laravel and vue.js and as message broadcast driver i use pusher now as a read from documentation that laravel automatically authenticate user for private and presence channel. Now my both model are different one in student and other is teacher so what i did to change the auth end point after changing auth end point i successfully hit the end point that returns me auth key but my problem is that it didn't call my channel. This is code of my chatApp.vue:
window.Echo.private(`student-messages.${this.student.id}`)
.listen('NewMessage',(e)=>{
console.log(e);
});
This is code of my route web.php:
Route::post('/custom/endpoint/auth',function (Request $request){
$pusher = new Pusher\Pusher(env('PUSHER_APP_KEY'),env('PUSHER_APP_SECRET'), env('PUSHER_APP_ID'));
return $pusher->socket_auth($request->request->get('channel_name'),$request->request->get('socket_id'));
});
This is code of my channel:
Broadcast::channel('student-messages.{id}', function($id) { return true; },['guards'=>['web']]);
Please or to participate in this conversation.