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.
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!