Add an eloquent command (#544)

* Add an eloquent command for adding the `@mixin \Eloquent` to the Illuminate\Database\Eloquent\Model

* spacing updates...

* multi-line function call syntax

* Write helper mixin to Eloquent/Model after helper created

* Cleanup into helper - similar to Generator

* syntax cleanup
This commit is contained in:
Charles Peterson
2017-08-28 15:12:54 +02:00
committed by Barry vd. Heuvel
parent ce72ff4663
commit fedcb57295
4 changed files with 157 additions and 4 deletions
+2 -1
View File
@@ -10,8 +10,8 @@
namespace Barryvdh\LaravelIdeHelper\Console;
use Barryvdh\LaravelIdeHelper\Eloquent;
use Barryvdh\LaravelIdeHelper\Generator;
use Illuminate\Config\Repository as ConfigRepository;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputOption;
@@ -115,6 +115,7 @@ class GeneratorCommand extends Command
if ($written !== false) {
$this->info("A new helper file was written to $filename");
Eloquent::writeEloquentModelHelper($this, $this->files);
} else {
$this->error("The helper file could not be created at $filename");
}