php-telegram-bot / laravel

Laravel package for PHP Telegram Bot Library
Other
168 stars 50 forks source link

How to call DB::getPdo(); from the controller? #16

Closed nullcookies closed 3 years ago

nullcookies commented 4 years ago
class DashboardController extends Controller
{
        $results = DB::selectChats([
            'groups'      => true,
            'supergroups' => true,
            'channels'    => true,
            'users'       => true,
            'text'        => null
        ]);

        dd($results); //false
}

dd($results); //false

noplanman commented 4 years ago

Make sure you call it after the connection to the DB has been established.