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.
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
Post a Comment