I am new one for the YII2.0,i like to create a model for the database via GII, but its throw an error like "table does not exist".
Below attached the screen for your further reference
I am new one for the YII2.0,i like to create a model for the database via GII, but its throw an error like "table does not exist".
Below attached the screen for your further reference
Configure properly the basic/config/db.php eg: like this template
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=yourHostName;dbname=yourDBName',
'username' => 'yourUserName',
'password' => 'yourPassword',
'charset' => 'utf8',
];
check in your web.php for this
$config = [
'id' => 'basic',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'components' => [
....
'db' => require(__DIR__ . '/db.php'),