In the routes/web.php of laravel 5.8 app I have defined :
Route::get('/adminPayConsultantInvoice/{invoice_id}', 'Server\AdminStripeController@payConsultantInvoice')->name('admin.pay-consultant-invoice');
but running from Javsscript :
document.location='adminPayConsultantInvoice/'+invoice_id
I got 404 error in output of
php artisan route:list
I see
| | GET|HEAD | adminPayConsultantInvoice/{invoice_id} | admin.pay-consultant-invoice | App\Http\Controllers\Server\AdminStripeController@payConsultantInvoice | web,checkLocale |
I do not see why I have this errir and how it can be fixed ?
Thanks!