ghaskell /
scaffold
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Ghaskell\Scaffold\Providers; |
||
| 4 | |||
| 5 | use Ghaskell\Scaffold\Console\Commands\ScaffoldGenerate; |
||
| 6 | use Ghaskell\Scaffold\Facades\Code; |
||
| 7 | |||
| 8 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 9 | { |
||
| 10 | const CONFIG_PATH = __DIR__ . './../../config/scaffold.php'; |
||
| 11 | |||
| 12 | protected $configPath; |
||
| 13 | |||
| 14 | public function __construct(\Illuminate\Contracts\Foundation\Application $app) |
||
| 15 | { |
||
| 16 | // $this->configPath = |
||
| 17 | parent::__construct($app); |
||
| 18 | |||
| 19 | } |
||
| 20 | |||
| 21 | public function boot() |
||
| 22 | { |
||
| 23 | Code::addExtension('stub', 'vibro'); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 24 | $this->publishes([ |
||
| 25 | self::CONFIG_PATH => config_path('scaffold.php'), |
||
| 26 | ], 'config'); |
||
| 27 | |||
| 28 | if ($this->app->runningInConsole()) { |
||
| 29 | $this->commands([ |
||
| 30 | ScaffoldGenerate::class, |
||
| 31 | ]); |
||
| 32 | } |
||
| 33 | $this->publishes([ |
||
| 34 | realpath(__DIR__ . '/../stubs') => app_path('Scaffold/stubs') |
||
| 35 | ], 'Scaffold Stubs'); |
||
| 36 | } |
||
| 37 | public function register() |
||
| 38 | { |
||
| 39 | $this->mergeConfigFrom( |
||
| 40 | self::CONFIG_PATH, |
||
| 41 | 'scaffold' |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |