title: NotFoundHttpException in RouteCollection.php line 161: in laravel 5
body: <p>I know this is very common question on stack overflow I tried few of them but its not working in my scenario .</p>
  
  <p>My CollectionController looks like this .</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use App\Http\Requests;
  use App\Http\Controllers\Controller;
  use App\Http\Middleware\Role;
  use Illuminate\Support\Facades\Input;
  use App\User;
  use App\Invoice;
  use Session;
  use Validator;
  
  
      class CollectionController extends Controller
      {
          /**
           * Display a listing of the resource.
           *
           * @return Response
           */
  
        public function __construct(){
  
          $this-&gt;middleware('role:collector'); // replace 'collector' with whatever role you need.
      }
  
  
        public function getHome(){
  
            $empid= Auth::user()-&gt;empid;
            $invoice = Invoice::where('Status','=',1)-&gt;orderBy('Id', 'desc')-&gt;get();
  
  
          return View('collectionmodule/home')-&gt;with(array('invoices'=&gt;$invoice));
  
       }
  
         public function getPayment(){
  
      dd('sssss');
               $id =$invoiceid;
               $invoice = Invoice::where('Id','=',$id)-&gt;payments()-&gt;comments()-&gt;get();
  
               return View('collectionmodule/payment')-&gt;with(array('invoice'=&gt;$id));
  
       }
  
  
  
  
          }
  </code></pre>
  
  <p>My Routes for this Class is as follow</p>
  
  <pre><code>Route::controller('collection/home','CollectionController');
  Route::controller('collection/payment','CollectionController');
  </code></pre>
  
  <p>I am getting following error</p>
  
  <pre><code>NotFoundHttpException in RouteCollection.php line 161:
  </code></pre>
  
  <p>None of the routes are working can any one help me out </p>
  
  <p>I tried with </p>
  
  <pre><code>http://localhost:8000/collection/home/
  
  and 
  
  http://localhost:8000/collection/payment
  </code></pre>
  
  <p>Thanks </p>