title: Target class [User] does not exist. - Laravel
body: <p>I am learning laravel. I tried many times but I didn't find what's the issue in my User controller.Please go through the code and help me out.</p>
  <blockquote>
  <p>Illuminate\Contracts\Container\BindingResolutionException Target class
  [User] does not exist.</p>
  </blockquote>
  <p>web.php file</p>
  <pre><code>&lt;?php
  use Illuminate\Support\Facades\Route;
                  
                  
  Route::get('/', function () {
      return view('welcome');
      //return redirect('sample');
  });
  
  // Route::get('sample/{id}',function($id){
  //     echo $id;
  //     return view('sample');
  // });
  
  // Route::view('sample','sample');
  // Route::redirect('youtube','sample');
  
  Route::get('users','User@index');
  Route::get('show','User@show');
          
  </code></pre>
  <p>This is my controller</p>
  <pre><code> &lt;?php
      
      namespace App\Http\Controllers;
      
      use Illuminate\Http\Request;
      
      class User extends Controller
      {
          //
          function index()
          {
              return ['name' =&gt; 'Abhishek'];
          }
          function show()
          {
              echo &quot;Hello controller&quot;;
          }
      }
  
  
  
   
  </code></pre>