mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +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,10 +10,11 @@
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Barryvdh\LaravelIdeHelper\Console\EloquentCommand;
|
||||
use Barryvdh\LaravelIdeHelper\Console\GeneratorCommand;
|
||||
use Barryvdh\LaravelIdeHelper\Console\MetaCommand;
|
||||
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
|
||||
use Barryvdh\LaravelIdeHelper\Console\GeneratorCommand;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\View\Engines\EngineResolver;
|
||||
use Illuminate\View\Engines\PhpEngine;
|
||||
use Illuminate\View\Factory;
|
||||
@@ -80,7 +81,19 @@ class IdeHelperServiceProvider extends ServiceProvider
|
||||
}
|
||||
);
|
||||
|
||||
$this->commands('command.ide-helper.generate', 'command.ide-helper.models', 'command.ide-helper.meta');
|
||||
$this->app->singleton(
|
||||
'command.ide-helper.eloquent',
|
||||
function ($app) use ($localViewFactory) {
|
||||
return new EloquentCommand($app['files']);
|
||||
}
|
||||
);
|
||||
|
||||
$this->commands(
|
||||
'command.ide-helper.generate',
|
||||
'command.ide-helper.models',
|
||||
'command.ide-helper.meta',
|
||||
'command.ide-helper.eloquent'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user