Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Array to string conversion

Exception

ErrorException

  1.                  $mailbox CompanyChannel::where(['page_id'=>$masking,'company_id'=>$company_id])->first();
  2.                  
  3.                  if(isset($mailbox->id)){
  4.                     $body "👋 Get Started";
  5.                     $response $this->createNoteFacebook($user_phone,$user_phone,$body$mailbox$attachments,$masking);
  6.                     return "response".$response;
  7.                     die();
  8.                  }
  9.              }
  10.             }
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2108)
  1.                  $mailbox CompanyChannel::where(['page_id'=>$masking,'company_id'=>$company_id])->first();
  2.                  
  3.                  if(isset($mailbox->id)){
  4.                     $body "👋 Get Started";
  5.                     $response $this->createNoteFacebook($user_phone,$user_phone,$body$mailbox$attachments,$masking);
  6.                     return "response".$response;
  7.                     die();
  8.                  }
  9.              }
  10.             }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Array to string conversion

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2108
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2108)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
{"status":true,"code":200,"message":"contact added","data":{"id":74,"first_name":"6503771606351273","last_name":"","gender":"","company":null,"job_title":null,"photo_type":null,"photo_url":null,"phone":"6503771606351273","phones":null,"websites":null,"social_profiles":null,"notes":null,"address":null,"city":null,"state":null,"zip":null,"country":null,"created_at":"2023-08-02T09:20:16.000000Z","updated_at":"2023-08-02T09:20:16.000000Z","channel":14,"channel_id":"6503771606351273","company_id":1,"meta":null,"tags":null,"is_bot":"no","email":null,"is_deleted":0,"last_agent_id":null,"last_conv_id":null,"is_rating_enabled":0,"facebook_id":null,"is_blocked":"no"}} {"status":true,"code":200,"message":"contact added","data":{"id":74,"first_name":"6503771606351273","last_name":"","gender":"","company":null,"job_title":null,"photo_type":null,"photo_url":null,"phone":"6503771606351273","phones":null,"websites":null,"social_profiles":null,"notes":null,"address":null,"city":null,"state":null,"zip":null,"country":null,"created_at":"2023-08-02T09:20:16.000000Z","updated_at":"2023-08-02T09:20:16.000000Z","channel":14,"channel_id":"6503771606351273","company_id":1,"meta":null,"tags":null,"is_bot":"no","email":null,"is_deleted":0,"last_agent_id":null,"last_conv_id":null,"is_rating_enabled":0,"facebook_id":null,"is_blocked":"no"}} {"status":true,"code":200,"message":"contact added","data":{"id":74,"first_name":"6503771606351273","last_name":"","gender":"","company":null,"job_title":null,"photo_type":null,"photo_url":null,"phone":"6503771606351273","phones":null,"websites":null,"social_profiles":null,"notes":null,"address":null,"city":null,"state":null,"zip":null,"country":null,"created_at":"2023-08-02T09:20:16.000000Z","updated_at":"2023-08-02T09:20:16.000000Z","channel":14,"channel_id":"6503771606351273","company_id":1,"meta":null,"tags":null,"is_bot":"no","email":null,"is_deleted":0,"last_agent_id":null,"last_conv_id":null,"is_rating_enabled":0,"facebook_id":null,"is_blocked":"no"}} {"status":true,"code":200,"message":"contact added","data":{"id":74,"first_name":"6503771606351273","last_name":"","gender":"","company":null,"job_title":null,"photo_type":null,"photo_url":null,"phone":"6503771606351273","phones":null,"websites":null,"social_profiles":null,"notes":null,"address":null,"city":null,"state":null,"zip":null,"country":null,"created_at":"2023-08-02T09:20:16.000000Z","updated_at":"2023-08-02T09:20:16.000000Z","channel":14,"channel_id":"6503771606351273","company_id":1,"meta":null,"tags":null,"is_bot":"no","email":null,"is_deleted":0,"last_agent_id":null,"last_conv_id":null,"is_rating_enabled":0,"facebook_id":null,"is_blocked":"no"}} Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)                
Undefined variable: contact (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: contact

Exception

ErrorException

  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
Application->Laravel\Lumen\Concerns\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php (line 2116)
  1.              }
  2.             }
  3.             
  4.           if($contacts->id){
  5.              return $this->apiResponse(['status'=>true,'code'=>200,'message'=>'contact added','data'=>$contact]);
  6.           }          
  7. }
  8.     
  9.      public function checkOfficeHours(Request $request){
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  1.             return $this->callLumenControllerWithMiddleware(
  2.                 $instance$method$routeInfo$middleware
  3.             );
  4.         } else {
  5.             return $this->callControllerCallable(
  6.                 [$instance$method], $routeInfo[2]
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.         // Pipe through route middleware...
  2.         if (isset($action['middleware'])) {
  3.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  4.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  5.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  6.             }));
  7.         }
  8.         return $this->prepareResponse(
  9.             $this->callActionOnArrayBasedRoute($routeInfo)
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php (line 48)
  1.                       'code' => 401,
  2.                       'message' => 'HTTP_UNAUTHORIZED'
  3.                     ], 401);
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.         if (isset($action['middleware'])) {
  2.             $middleware $this->gatherMiddlewareClassNames($action['middleware']);
  3.             return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
  4.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  5.             }));
  6.         }
  7.         return $this->prepareResponse(
  8.             $this->callActionOnArrayBasedRoute($routeInfo)
  9.         );
  1.             return $this->sendThroughPipeline($this->middleware, function ($request) use ($method$pathInfo) {
  2.                 $this->instance(Request::class, $request);
  3.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  4.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  5.                 }
  6.                 return $this->handleDispatcherResponse(
  7.                     $this->createDispatcher()->dispatch($method$pathInfo)
  8.                 );
  1.      */
  2.     protected function prepareDestination(BaseClosure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable$e);
  9.             }
  10.         };
  11.     }
Pipeline->Laravel\Lumen\Routing\{closure}() in /var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php (line 30)
  1.         if ($request->isMethod('OPTIONS'))
  2.         {
  3.             return response()->json('{"method":"OPTIONS"}'200$headers);
  4.         }
  5.         $response $next($request);
  6.         foreach($headers as $key => $value)
  7.         {
  8.             $response->header($key$value);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         return function ($stack$pipe) {
  2.             return function ($passable) use ($stack$pipe) {
  3.                 try {
  4.                     $slice parent::carry();
  5.                     return ($slice($stack$pipe))($passable);
  6.                 } catch (Throwable $e) {
  7.                     return $this->handleException($passable$e);
  8.                 }
  9.             };
  10.         };
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.     {
  2.         if (count($middleware) > && ! $this->shouldSkipMiddleware()) {
  3.             return (new Pipeline($this))
  4.                 ->send($this->make('request'))
  5.                 ->through($middleware)
  6.                 ->then($then);
  7.         }
  8.         return $then($this->make('request'));
  9.     }
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app->run();

Stack Trace

ErrorException
ErrorException:
Undefined variable: contact

  at /var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116
  at Laravel\Lumen\Application->handleError()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Controllers/ConversationController.php:2116)
  at App\Http\Controllers\ConversationController->createOrUpdateFacebookContact()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/Authenticate.php:48)
  at App\Http\Middleware\Authenticate->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:169)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/app/Http/Middleware/CorsMiddleware.php:30)
  at App\Http\Middleware\CorsMiddleware->handle()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:167)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)
  at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()
     (/var/www/html/generic/zong_berrytalks_api/vendor/illuminate/pipeline/Pipeline.php:103)
  at Illuminate\Pipeline\Pipeline->then()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/var/www/html/generic/zong_berrytalks_api/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/var/www/html/generic/zong_berrytalks_api/index.php:28)