Dependency Injection Laravel <p>I have a Facade Class</p> <pre><code>use App\Http\Response class RUser { public function signup(TokenGenerator $token_generator, $data) { $response = []; $access_token = $token_generator-&gt;generate(32); dd($access_token); $user = User::create($data); $response['user_id'] = $user-&gt;_id; $response['']; } } </code></pre> <p>Now from my <code>UserController</code> I am trying to use the <code>RUser::signup()</code> function like below </p> <pre><code>class UserController extends Controller { public function store(Request $request) { $this-&gt;request = $request; $payload = json_decode($this-&gt;request-&gt;getContent()); if($this-&gt;validateJson('user.create', $payload)) { $validator = Validator::make((array) $payload, User::$rules); if ($validator-&gt;fails()) { $messages = $validator-&gt;errors(); return $this-&gt;sendResponse(false, $messages); } FUser::signup($payload); return $this-&gt;sendResponse(true, $response); } } } </code></pre> <p>I think Laravel resolves these dependency automatically and i shound not be passing the instance of <code>TokenGenerator</code> explicitly. But i am getting the following error.</p> <pre><code>Argument 1 passed to App\Http\Responses\RUser::signup() must be an instance of App\Utils\TokenGenerator, instance of stdClass given, called in </code></pre>