Read Receipt Laravel Pusher

早过忘川 提交于 2020-08-10 19:24:15

问题


How can i call This method on My Project

class MessageDeliveredController extends Controller
{
    /**
     * Handle the incoming request.
     *
     * @param  \App\Chat $chat
     * @return void
     */
    public function __invoke(Chat $chat)
    {
        $chat->status = 'Delivered';
        $chat->save();

        broadcast(new MessageDelivered($chat));
    }
}        

I need Correct way

my routes are

Route::get('/chats', 'ChatController@index');
Route::get('/messages', 'ChatController@fetchAllMessages');
Route::post('/messages', 'ChatController@sendMessage');
Route::post('/chats', 'MessageDeliveredController');

来源:https://stackoverflow.com/questions/62516801/read-receipt-laravel-pusher

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!