@@ -83,6 +83,16 @@ abstract class Kernel
abstract public function registerRoutes();
+ /**
+ * Checks whether the current kernel has been booted or not.
+ *
+ * @return boolean $booted
+ */
+ public function isBooted()
+ {
+ return $this->booted;
+ }
+
/**
* Boots the current kernel.
*
@@ -373,6 +373,12 @@ abstract class Kernel
public function boot()
{
if (true === $this->booted)
@@ -38,7 +38,10 @@ class Application extends BaseApplication
$this->definition->addOption(new InputOption('--shell', '-s', InputOption::PARAMETER_NONE, 'Launch the shell.'));
- $this->kernel->boot();
+ if (!$this->kernel->isBooted())
+ $this->kernel->boot();
$this->registerCommands();
}