问题
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