Update Cli Factory loading

This commit is contained in:
Maarten 2020-01-07 22:24:59 +01:00
parent 04aee8c5a3
commit 013c799102
4 changed files with 6 additions and 6 deletions

View file

@ -58,11 +58,11 @@ trait Colors {
$colored_string = ""; $colored_string = "";
if (isset($this->foreground_colors[$foreground])) { if (isset($this->foreground[$foreground])) {
$colored_string .= "\033[" . $this->foreground[$foreground] . "m"; $colored_string .= "\033[" . $this->foreground[$foreground] . "m";
} }
if (isset($this->background_colors[$background])) { if (isset($this->background[$background])) {
$colored_string .= "\033[" . $this->background[$background] . "m"; $colored_string .= "\033[" . $this->background[$background] . "m";
} }

View file

@ -27,7 +27,7 @@ class CommandsCollection
if(!class_exists($class)) continue; if(!class_exists($class)) continue;
$executor = app($class); $executor = app()->make($class);
self::$collection[$executor->signature] = $executor; self::$collection[$executor->signature] = $executor;
} }
} }

View file

@ -22,7 +22,7 @@ class BootstrapFactory {
require_once('../routes/web.php'); require_once('../routes/web.php');
// start engines // start engines
app(ViewEngine::class); app()->make(ViewEngine::class);
try { try {
Route::start(); Route::start();
@ -37,7 +37,7 @@ class BootstrapFactory {
*/ */
public function kernel() public function kernel()
{ {
app(CliFactory::class)->handle(); app()->make(CliFactory::class)->handle();
} }
/** /**

View file

@ -166,7 +166,7 @@ if(!function_exists('view'))
*/ */
function view($name, $arguments = []) function view($name, $arguments = [])
{ {
$factory = app(ViewFactory::class); $factory = app()->make(ViewFactory::class);
return $factory->make($name, $arguments); return $factory->make($name, $arguments);
} }