0

I have a

routes.php

file in my plugin directory that has lots of routing rules for example a part of it is:

# global routes for buy and sell
  Route::post('loadgroups/','Imis\Accounting\Controllers\SaleFactors@loadGroups');
  Route::post('loadproducts/','Imis\Accounting\Controllers\SaleFactors@loadProducts');
  Route::post('mobile/','Imis\Accounting\Controllers\SaleFactors@mobile');
  Route::post('cashcredit/','Imis\Accounting\Controllers\SaleFactors@calcCashCredit');

my problem is that all the routes working correctly except the last one which throws

404 not found

is there any idea about this problem and how to solve it!? Thank you.

saleh asadi
  • 95
  • 1
  • 12

1 Answers1

1

If you definitely have the Controller method defined then the only thing I can think of is that may be you are POSTing somewhere else. A typo may be!? You might want to look at your form (or however you are making that POST request) to make sure you're hitting the right route. Looking hard at the StackTrace might also be helpful.

For added measure, you might clear the cache: php artisan cache:clear

Hopefully, you find a fix. Good luck!

  • thanks. i solved the problem it was so odd! I changed the method name to camel case of route address and it worked. for example: route-> getbank & method -> getBank – saleh asadi May 09 '17 at 09:27
  • Yeah those things are case-sensitive. Glad you made it work. I had a feeling it was probably a typo or naming related thing. \m/ – Pratyush Pundir May 09 '17 at 15:38