NotFoundHttpException in RouteCollection php line 161 in laravel 5

0 votes

My CollectionController looks like this .

<?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->middleware('role:collector'); // replace 'collector' with whatever role you need.
    }


      public function getHome(){

          $empid= Auth::user()->empid;
          $invoice = Invoice::where('Status','=',1)->orderBy('Id', 'desc')->get();


        return View('collectionmodule/home')->with(array('invoices'=>$invoice));

     }

       public function getPayment(){

    dd('sssss');
             $id =$invoiceid;
             $invoice = Invoice::where('Id','=',$id)->payments()->comments()->get();

             return View('collectionmodule/payment')->with(array('invoice'=>$id));

     }




        }

My Routes for this Class are as follow

Route::controller('collection/home','CollectionController');
Route::controller('collection/payment','CollectionController');

I am getting the following error

NotFoundHttpException in RouteCollection.php line 161:

None of the routes are working can anyone help me out?

Jun 24, 2022 in PHP by narikkadan
• 63,420 points
974 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer
0 votes
0 answers
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

answered Aug 4, 2020 in PHP by Niroj
• 82,880 points
3,888 views
0 votes
1 answer

Error:Undefined index: barangay in C:\xampp\htdocs\TextBlast\homepage\insert.php on line 22

Hello @ Regina, First checks whether a variable is ...READ MORE

answered Aug 14, 2020 in PHP by Niroj
• 82,880 points
5,414 views
–1 vote
1 answer
0 votes
1 answer

Error: Maximum execution time of 60 seconds exceeded in C:\xampp\phpmyadmin\libraries\dbi\mysql.dbi.lib.php on line 140

Hello @kartik, Go to: xampp\phpMyAdmin\libraries\config.default.php Look for : $cfg['ExecTimeLimit'] = 600; You ...READ MORE

answered Sep 1, 2020 in PHP by Niroj
• 82,880 points
13,890 views
0 votes
1 answer

Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required

Your mail.php on config you declare host ...READ MORE

answered Feb 16, 2022 in Others by Aditya
• 7,680 points
2,430 views
0 votes
0 answers

How to access function value in another function in PHP Classes

How can I return a variable value ...READ MORE

Jun 10, 2022 in PHP by narikkadan
• 63,420 points
842 views
0 votes
0 answers

Laravel 5 – Clear Cache in Shared Hosting Server

php artisan cache:clear Is there any workaround to ...READ MORE

Jun 20, 2022 in PHP by Kithuzzz
• 38,010 points
379 views
0 votes
0 answers

When to generate a new Application Key in Laravel?

As it automatically sets it for me ...READ MORE

Jun 25, 2022 in PHP by narikkadan
• 63,420 points
396 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP