mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
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:
committed by
Barry vd. Heuvel
parent
ce72ff4663
commit
fedcb57295
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user