mercredi 28 août 2019

Telegram for Laravel 5.8 [on hold]

I'm coding an app to send messages to different telegram channels where a telegramBot is administrator. I'm using https://github.com/babenkoivan/telegram-notifications but in the example, there is only one channel ID.

My idea is to get channel ID's from a table depending on a user role.

In babenkoivan code example:

<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable{
    use Notifiable;

    // ...
    public function routeNotificationForTelegram(){
        return '993344556';
    }
}

There is only one chat_id and don't know how return chat ID depending on one saved on a database table.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire