This commit is contained in:
JaguarJack 2020-11-19 17:44:11 +08:00
parent 9ca1fd42ae
commit 0dfe4fb5c6
3 changed files with 3 additions and 5 deletions

View File

@ -97,7 +97,7 @@ class Generator
switch ($type) {
case 'controller':
return (new Controller())->dones();
return (new Controller())->getContent($controller);
case 'model':
return (new Model())->getContent($model);
default:

View File

@ -86,9 +86,8 @@ class Controller extends Factory
}
$class->addProperty(
(new Property($asModel))->public()
(new Property($asModel))->protected()
);
})
->getContent();
}

View File

@ -58,8 +58,7 @@ class Composer
{
$packages = array_merge($this->requires(), $this->requireDev());
return in_array($name, $packages);
return in_array($name, array_keys($packages));
}
/**