Browse Source

Update removed trait

tags/1.4.0^2
Nafies Luthfi 6 years ago
parent
commit
5ca6512d5f
  1. 5
      src/GeneratorCommand.php
  2. 11
      src/Generators/BaseGenerator.php

5
src/GeneratorCommand.php

@ -2,10 +2,10 @@
namespace Luthfi\CrudGenerator; namespace Luthfi\CrudGenerator;
use Illuminate\Support\Str;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Container\Container; use Illuminate\Container\Container;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;
class GeneratorCommand extends Command class GeneratorCommand extends Command
{ {
@ -129,7 +129,6 @@ class GeneratorCommand extends Command
); );
} }
protected function getAppNamespace() protected function getAppNamespace()
{ {
return Container::getInstance()->getNamespace(); return Container::getInstance()->getNamespace();

11
src/Generators/BaseGenerator.php

@ -2,18 +2,16 @@
namespace Luthfi\CrudGenerator\Generators; namespace Luthfi\CrudGenerator\Generators;
use Illuminate\Container\Container;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Luthfi\CrudGenerator\GeneratorCommand;
use Illuminate\Console\DetectsApplicationNamespace;
use Luthfi\CrudGenerator\Contracts\Generator as GeneratorContract; use Luthfi\CrudGenerator\Contracts\Generator as GeneratorContract;
use Luthfi\CrudGenerator\GeneratorCommand;
/** /**
* Base Generator Class * Base Generator Class
*/ */
abstract class BaseGenerator implements GeneratorContract abstract class BaseGenerator implements GeneratorContract
{ {
use DetectsApplicationNamespace;
/** /**
* The injected Filesystem class * The injected Filesystem class
* *
@ -130,4 +128,9 @@ abstract class BaseGenerator implements GeneratorContract
{ {
return $this->command->getName() == 'make:crud-api'; return $this->command->getName() == 'make:crud-api';
} }
protected function getAppNamespace()
{
return Container::getInstance()->getNamespace();
}
} }
Loading…
Cancel
Save