diff --git a/src/Providers/ApplicationProvider.php b/src/Providers/ApplicationProvider.php index 0510bbc5..d23824c5 100644 --- a/src/Providers/ApplicationProvider.php +++ b/src/Providers/ApplicationProvider.php @@ -6,7 +6,11 @@ use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Contracts\Foundation\Application; +use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Application as LaravelApplication; +use Illuminate\Foundation\AliasLoader; +use Laravel\Lumen\Application as LumenApplication; use Orchestra\Testbench\Concerns\CreatesApplication; use function define; @@ -33,9 +37,20 @@ public static function bootApp(): void // @todo do not bootstrap \Illuminate\Foundation\Bootstrap\HandleExceptions $consoleApp->bootstrap(); + self::bootAppRegister($app); + self::bootAppAlias(); + } + + protected static function bootAppRegister(LaravelApplication $app): void + { $app->register(IdeHelperServiceProvider::class); } + protected static function bootAppAlias(): void + { + AliasLoader::getInstance()->alias('Eloquent', Model::class); + } + public static function getApp(): LaravelApplication { if (self::$app instanceof \Illuminate\Container\Container) {