$this->getRouteName($routeUrl, 'POST'), 'uses'=> $controllerName.'@'.$controllerFunction)); \Route::get($routeUrl, array('as'=>$this->getRouteName($routeUrl, 'GET'), 'uses'=> $controllerName.'@'.$controllerFunction)); if(!in_array($controllerName, $this->bootedControllers)){ $this->bootedControllers[] = $controllerName; } } private function checkControllerExists($controllerName){ $controllersSubDir = \Config::get('app.controllersSubdir'); $appImplementationId = \Config::get('app.appImplementationId'); if($controllersSubDir && file_exists(app_path().'/controllers/'.$controllersSubDir.'/'.$controllerName.'.php')){ return true; } if($appImplementationId && file_exists(app_path().'/controllers/'.$controllersSubDir.'/'.$appImplementationId.'/'.$controllerName.'.php')){ return true; } if(file_exists(app_path().'/controllers/'.$controllerName.'.php')){ return true; } return false; } private function getControllerNameFromRouteArray(&$routeArray){ $controllerName = NULL; array_walk($routeArray, function($route) use (&$controllerName){ $controllerName .= ucfirst($route); }); return $controllerName.'Controller'; } private function getControllerFunctionName($routeLastElem, $controllerWasFound){ if($controllerWasFound || $routeLastElem === NULL){ // second is HomeController return 'processMain'; } else { return 'process'.ucfirst($routeLastElem); } } private function buildRoute(&$routeArray){ $controllerName = $this->getControllerNameFromRouteArray($routeArray); if($this->checkControllerExists($controllerName)){ $lastRouteElem = last($routeArray); $this->defineRoute(implode('/', $routeArray), $controllerName, $this->getControllerFunctionName($lastRouteElem, true)); } else { $backwardArray = $routeArray; $closureRecursiveControllerDefinition = function($thisFunction) use (&$backwardArray){ $popped = array_pop($backwardArray); $controllerName = $this->getControllerNameFromRouteArray($backwardArray); if(!empty($backwardArray)){ // as long as we can go backward in routeArray if($this->checkControllerExists($controllerName)){ $this->defineRoute(implode('/', $backwardArray).'/'.$popped, $controllerName, $this->getControllerFunctionName($popped, false)); } else { $thisFunction($thisFunction); // no controller found for level above, so go back another level } } }; $closureRecursiveControllerDefinition($closureRecursiveControllerDefinition); } } private function recursive__buildRoutes(&$current, &$nextLevel){ if(is_array($nextLevel)){ foreach($nextLevel as $levelIndex=>$subLevel): $current_ = array_merge($current, array($levelIndex)); $this->recursive__buildRoutes($current_, $subLevel); endforeach; } else { $this->buildRoute($current); } } public function boot(){ /* event listeners */ if(\Config::get('app.logQueries')){ $logger = \Core::getMonologFileLogger('queries.log', true); \Event::listen('illuminate.query', function() use($logger) { $args = func_get_args(); if(is_array($args[1])){ $query = $args[0]; foreach($args[1] as $repl): $query = preg_replace('/\?/', '\''.$repl.'\'', $query, 1); endforeach; } else { $query = $args[0]; } $logger->addInfo('query: '.$query); }); } // initialising the visitor (singleton, service provider "VisitorServiceProvider") \Visitor::init(); // 404 handling $this->app->missing(function($exception){ $controller = \app::make(\Config::get('app.homeControllerName')); return $controller->process404(); }); } public function setupConfig(){ self::$routeDefinition = \Core::getRouteDefinition(); self::$controllerBindings = \Core::getControllerBindings(); self::$globalBindings = \Core::getGlobalBindings(); } public function register(){ if(file_exists(app_path().'/start/global_constants.php')){ require(app_path().'/start/global_constants.php'); } $this->app->singleton('Core', function(){ $coreClass = \Config::get('app.classPathCore'); return new $coreClass; }); $this->setupConfig(); /* home route */ $this->defineRoute('/', \Config::get('app.homeControllerName'), $this->getControllerFunctionName(NULL, true)); /* other routes */ foreach(self::$routeDefinition as $routeLevel1=>$routesLevel2): $current = array($routeLevel1); $this->recursive__buildRoutes($current, $routesLevel2); endforeach; /* global bindings */ if(!empty(self::$globalBindings)){ foreach(self::$globalBindings as $interface=>$data): /* object */ if(array_key_exists('singleton', $data) && $data['singleton'] === true){ $this->app->singleton($interface, function($app) use ($data){ $singleton = new $data['class']($app); if(array_key_exists('bindings', $data)){ foreach($data['bindings'] as $varName=>$binding): $singleton->setDependency($varName, $app->make($binding)); endforeach; } return $singleton; }); } else { $this->app->bind($interface, function($app) use ($data, $interface){ if(array_key_exists('bindings', $data)){ $injections = array(); foreach($data['bindings'] as $varName=>$binding): $injections[$varName] = $app->make($binding); endforeach; $implementation = new $data['class']($injections); } else { $implementation = new $data['class'](); } /* passing the boundname itself into the object that it can easiely create new implementions of itself within that object (f.e. for loading it`s parents) */ if(method_exists($implementation, 'setAppBoundName')){ $implementation->setAppBoundName($interface); } return $implementation; }); } endforeach; } /* controller bindings */ //if(!empty($this->bootedControllers)){ //foreach($this->bootedControllers as $controllerName): foreach(array_keys(self::$controllerBindings) as $controllerName): if(!empty(self::$controllerBindings[$controllerName])){ $this->app->bind($controllerName, function($app) use ($controllerName) { $controllerWithBindings = new $controllerName; foreach(self::$controllerBindings[$controllerName] as $varnameToBind=>$interfaceToBind): $controllerWithBindings->setDependency($varnameToBind, $app->make($interfaceToBind)); endforeach; return $controllerWithBindings; }); } endforeach; //} } } Whoops! There was an error.
1. Symfony\Component\Debug\Exception\FatalErrorException
…/­vendor/­laravel/­framework/­src/­Illuminate/­Foundation/­ProviderRepository.php157
0. Illuminate\Exception\Handler handleShutdown
<#unknown>0

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)

Callstack information; navigate with mouse or keyboard using Ctrl+↑ or Ctrl+↓
Copy-to-clipboard button
Exception message and its type
Code snippet where the error was thrown
Server state information
Application provided context information
Symfony\Component\Debug\Exception\FatalErrorException thrown with message "Class 'Uecadmin\Providers\Engine' not found" Stacktrace: #1 Symfony\Component\Debug\Exception\FatalErrorException in /srv/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:157 #0 Illuminate\Exception\Handler:handleShutdown in <#unknown>:0

Class 'Uecadmin\Providers\Engine' not found

	 *
	 * @param  \Illuminate\Foundation\Application  $app
	 * @param  string  $provider
	 * @return \Illuminate\Support\ServiceProvider
	 */
	public function createProvider(Application $app, $provider)
	{
		return new $provider($app);
	}
 
<#unknown>
empty
empty
empty
empty
empty
Key Value
USER nginx
HOME /var/lib/nginx
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /srv/www/public/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /
DOCUMENT_URI /index.php
DOCUMENT_ROOT /srv/www/public
SERVER_PROTOCOL HTTP/1.0
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.10.2
REMOTE_ADDR 54.162.255.186
REMOTE_PORT 37594
SERVER_ADDR 46.101.131.158
SERVER_PORT 80
SERVER_NAME admin.uecsystem.de
REDIRECT_STATUS 200
HTTP_HOST courselly.com
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1503018493.1225
REQUEST_TIME 1503018493
empty
0. Whoops\Handler\PrettyPageHandler