php - Laravel ReflectionException in Controller -


i'm trying inject class hotelstransformer without success next code:

usertransformer

<?php  namespace app\transformers;  class usertransformer extends transformer {    ... } 

hotelstransformer

<?php  namespace app\transformers;  class hotelstransformer extends transformer {    ... } 

apihotelscontroller

<?php   namespace app\http\controllers\api;  use illuminate\http\request;  use app\http\requests; use app\http\controllers\controller;  use \app\hotel; use \app\transformers\hotelstransformer;  class apihotelscontroller extends apicontroller {    protected $hotelstransformer;     public function __construct(hotelstransformer $hotelstransformer)    {        $this->hotelstransformer = $hotelstransformer;        dd($this->hotelstransformer);    } 

when inject usertransformer, it's ok, when change usertransformer hotelstransformer throws me error.

enter image description here

i don't know why happening, because cloned usertransformer , change name same error persists.

check following namespace. may not exist or namespace path not correct

use \app\transformers\hotelstransformer; 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -