Lumen / Laravel - PDOException: could not find driver

0

I want to connect Lumen to MySQL.

PHP INFO link

Web.php file (containing the routes)

$router->get('/', function () use ($router) {
    $results = app('db')->select("SELECT * FROM resenha");
    return $router->app->version();
});

.env file

APP_ENV=local
APP_DEBUG=true
APP_KEY=lumenmakesconnectingwithdatabas
APP_TIMEZONE=UTC

LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=uptofive
DB_USERNAME=root
DB_PASSWORD=

CACHE_DRIVER=file
QUEUE_DRIVER=sync

Database.php file

Connectionrunning(HeidiSQL):

Connection running (Silex):

'dbname' => 'uptofive',
'user' => 'root',
'password' => '',
'host' => 'localhost',
'driver' => 'pdo_mysql',
'charset' => 'utf8'
    
asked by anonymous 04.04.2018 / 19:25

0 answers