title: Laravel 5.5: Controller does not exist
body: <p>Coming from CodeIgniter, I decided that it's time for something new and went for Laravel. I love the syntax of the framework and how clean it is, however, I am overwhelmed by how complicated simple things seem to be. I have a controller and want to link to a function in said controller. Whatever I do, I keep getting this error:</p>
  
  <pre><code>   ReflectionException in Route.php line 280:
  Class App\Http\Controllers\TasksController does not exist
  </code></pre>
  
  <p>I have Googled this issue but I just can't seem to figure it out. It seems like I got everything right but then again, I'm completely new to this framework so I don't really know. I have a namespace, a route and all of that stuff. Anyway, here is my code:</p>
  
  <p>The link</p>
  
  <pre><code>&lt;a class="nav-link" href="&lt;?= url('tasks') ?&gt;"&gt;Tasks&lt;/a&gt;
  </code></pre>
  
  <p>My route in routes.php</p>
  
  <pre><code>Route::resource('tasks', 'TasksController');
  </code></pre>
  
  <p>TasksController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Controller;
  
  use App\User;
  use App\Http\Controllers\Controller;
  
  class TasksController extends Controller
  {
      public function index()
      {
          $tasks = DB::table('tasks')-&gt;get();
          return view('tasks', ['tasks' =&gt; $tasks]);
      }
  }
  </code></pre>
  
  <p>Thank you for any answers and if you need more information, please say so.</p>