title: Laravel Scheduling call controller
body: <p>I work with Laravel Task Scheduling, but I have a problem when I call some method from my controller.</p>
  
  <pre><code>protected function schedule(Schedule $schedule)
  {
      $schedule-&gt;call('UserController@deleteInactiveUsers')-&gt;everyMinute();
      //$schedule-&gt;call('App\Http\Controllers\UserController@deleteInactiveUsers')-&gt;everyMinute();
  }
  </code></pre>
  
  <p>When I call with uncommented line i get this error:</p>
  
  <pre><code>[ReflectionException]
  Class RecurrenceInvoiceController does not exist
  </code></pre>
  
  <p>and then I insert fully qualified namespace path and then I get this error:</p>
  
  <pre><code>[PDOException] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
  </code></pre>
  
  <p>And </p>
  
  <pre><code>[ErrorException] PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known 
  </code></pre>
  
  <p>Where is the problem? Which way is correct to call method from Controller from Laravel Task Scheduling.</p>