title: Laravel Custom Controller getting 404 error
body: <p>I have created the new controller using command line on laravel</p>
  
  <pre><code>php artisan make:controller PhotoController --resource
  </code></pre>
  
  <p>just display the string on a function of PhotoController like below</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  class PhotoController extends Controller
  {
  
      /**
       * Display a listing of the resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function getName()
      {
          echo 'Dev';
      }
  </code></pre>
  
  <p>Called the controller on route web.php</p>
  
  <pre><code>Route::get('photos', 'PhotoController@getName');
  </code></pre>
  
  <p>When i trying to load the url of controller</p>
  
  <pre><code>http://localhost/dev_laravel/public/photos
  </code></pre>
  
  <p>getting 404 Not found error</p>
  
  <p>I also tried</p>
  
  <pre><code>http://localhost/dev_laravel/public/photo/
  http://localhost/dev_laravel/public/photo/getname/
  </code></pre>
  
  <p>I'm beginner or learner for laravel and working on 5.8 version</p>
  
  <p>php artisan route:list</p>
  
  <p>after</p>
  
  <p><a href="https://i.stack.imgur.com/S5AeO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S5AeO.png" alt="enter image description here"></a></p>
  
  <p>Can anyone help me?</p>