diff --git a/src/Commands/ScaffoldMakeCommand.php b/src/Commands/ScaffoldMakeCommand.php index 6c3f0cc..37d4bc0 100755 --- a/src/Commands/ScaffoldMakeCommand.php +++ b/src/Commands/ScaffoldMakeCommand.php @@ -2,7 +2,7 @@ namespace Laralib\L5scaffold\Commands; -use Illuminate\Console\AppNamespaceDetectorTrait; +use Illuminate\Console\DetectsApplicationNamespace; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Input; @@ -77,7 +77,7 @@ public function __construct(Filesystem $files) * @return void */ public function fire() - { + { $header = "scaffolding: {$this->getObjName("Name")}"; $footer = str_pad('', strlen($header), '-'); $dump = str_pad('>DUMP AUTOLOAD<', strlen($header), ' ', STR_PAD_BOTH); @@ -105,7 +105,7 @@ public function fire() * * @return void */ - protected function makeMeta() + protected function makeMeta() { // ToDo - Verificar utilidade... $this->meta['action'] = 'create'; @@ -113,15 +113,15 @@ protected function makeMeta() $this->meta['table'] = $this->getObjName("names");//obsoleto $this->meta['ui'] = $this->option('ui'); - + $this->meta['namespace'] = $this->getAppNamespace(); - + $this->meta['Model'] = $this->getObjName('Name'); $this->meta['Models'] = $this->getObjName('Names'); $this->meta['model'] = $this->getObjName('name'); $this->meta['models'] = $this->getObjName('names'); $this->meta['ModelMigration'] = "Create{$this->meta['Models']}Table"; - + $this->meta['schema'] = $this->option('schema'); $this->meta['prefix'] = ($prefix = $this->option('prefix')) ? "$prefix." : ""; } @@ -145,7 +145,7 @@ private function makeController() { new MakeController($this, $this->files); } - + /** * Make a layout.blade.php with bootstrap * @@ -202,7 +202,7 @@ private function makeLocalization() */ protected function getArguments() { - return + return [ ['name', InputArgument::REQUIRED, 'The name of the model. (Ex: Post)'], ]; @@ -215,13 +215,13 @@ protected function getArguments() */ protected function getOptions() { - return + return [ [ - 'schema', - 's', - InputOption::VALUE_REQUIRED, - 'Schema to generate scaffold files. (Ex: --schema="title:string")', + 'schema', + 's', + InputOption::VALUE_REQUIRED, + 'Schema to generate scaffold files. (Ex: --schema="title:string")', null ], [ @@ -253,17 +253,17 @@ protected function getOptions() null, ], [ - 'form', - 'f', - InputOption::VALUE_OPTIONAL, - 'Use Illumintate/Html Form facade to generate input fields', + 'form', + 'f', + InputOption::VALUE_OPTIONAL, + 'Use Illumintate/Html Form facade to generate input fields', false ], [ - 'prefix', - 'p', - InputOption::VALUE_OPTIONAL, - 'Generate schema with prefix', + 'prefix', + 'p', + InputOption::VALUE_OPTIONAL, + 'Generate schema with prefix', false ] ]; @@ -301,7 +301,7 @@ public function getObjName($config = 'Name') $names['name'] = str_singular(strtolower(preg_replace('/(?scaffoldCommandObj->getObjName('Name') . 'Controller'; $path = $this->getPath($name, 'controller'); - if ($this->files->exists($path)) + if ($this->files->exists($path)) { return $this->scaffoldCommandObj->comment("x $name"); } @@ -90,4 +90,4 @@ protected function compileControllerStub() // } -} \ No newline at end of file +} diff --git a/src/Makes/MakeRoute.php b/src/Makes/MakeRoute.php index c96cfbe..8505d55 100755 --- a/src/Makes/MakeRoute.php +++ b/src/Makes/MakeRoute.php @@ -8,7 +8,7 @@ namespace Laralib\L5scaffold\Makes; -use Illuminate\Console\AppNamespaceDetectorTrait; +use Illuminate\Console\DetectsApplicationNamespace; use Illuminate\Filesystem\Filesystem; use Laralib\L5scaffold\Commands\ScaffoldMakeCommand; use Laralib\L5scaffold\Migrations\SchemaParser; @@ -61,4 +61,4 @@ protected function compileRouteStub() return $stub; } -} \ No newline at end of file +}