exception 'ErrorException' with message 'Trying to get property of non-object' in /var/www/app/controllers/BadgeController.php:8 Stack trace: #0 /var/www/app/controllers/BadgeController.php(8): Illuminate\Exception\Handler->handleError(8, 'Trying to get p...', '/var/www/app/co...', 8, Array) #1 [internal function]: BadgeController->viewBadge('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...') #2 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php(138): call_user_func_array(Array, Array) #3 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php(115): Illuminate\Routing\Controllers\Controller->callMethod('viewBadge', Array) #4 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(985): Illuminate\Routing\Controllers\Controller->callAction(Object(Illuminate\Foundation\Application), Object(Illuminate\Routing\Router), 'viewBadge', Array) #5 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}('\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD\xEF\xBF\xBD...') #6 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php(80): call_user_func_array(Object(Closure), Array) #7 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php(47): Illuminate\Routing\Route->callCallable() #8 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1016): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request)) #9 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(576): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #10 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(552): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request)) #11 /var/www/public/index.php(49): Illuminate\Foundation\Application->run() #12 {main}