Closed cufano closed 6 years ago
How does your config/console.php
respectively your console/config/main.php
looks like?
Should be something like this:
<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$config = [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log', 'schema'],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
'modules' => [
'schema' => [
'class' => 'simialbi\yii2\schemaorg\Module'
]
]
];
return $config;
Consider the bootstrap
and modules
parts.
Hello @simialbi thnak you for your response, I was using the console/config/main-local.php instead of console/config/main.php for setting the configuration. Now I changed it to main.php and all models have been generated
Hello, when generating the model with
php yii schema/schema-org
I get this error:
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: yii\console\Application::schema'