Destiny Brotobor
Destiny Brotobor

Reputation: 108

Using Trin4ik/laravel-expo-push package to work with multiple database connection with multiple instances

I am using the https://github.com/trin4ik/laravel-expo-push and I am creating an application that have two different connection, to two different databases which have users respectively. What I am try to achieve is to direct the notification to the appropraite type of user based on the database connection.

According to their documentation and laravel capabilities, I can actually create a table and models which will their ExpoPushNotification Model which I did, added the protected $connection = "my_connection" to each of the model of the Trin4ik\LaravelExpoPush\Models\ExpoPushNotification.php child models but my question is how do I make this instance in the config/expo-push work for both databases. Sample of the config according to their docs shown below;

return [
    // ...
    'log' => [
        // ...
        'driver' => [
            // ...
            'instance' => \App\Models\ExpoPushNotification::class
        ]
    ]
];

Upvotes: 0

Views: 8

Answers (0)

Related Questions