• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Parameter is not sent to Laravel route in Ajax

javascriptphpajaxlaravellaravel-5.8


PHP Snippet 1:

let url = "{{ route('payCourseRegistrationWithDiscount',['course'=>$item->cor_id,'value'=>':cartValueDiscountedWithCode']) }}";
url = url.replace(':cartValueDiscountedWithCode', data.cartValueDiscountedWithCode);
window.location.href = url;

PHP Snippet 2:

window.location.href = {{route('payCourseRegistrationWithDiscount', ['course'=>$item->cor_id]) }}}+'/'+data.cartValueDiscountedWithCode

Related Snippets

Pass an image through AJAX [duplicate]

Laravel unique validation on multiple columns

Input and output values for php into the browser?

How to get AJAX to post on second page?

How can I make good efficent AJAX live forms with just jQuery and

How to Display Data in Yajra Datatables Laravel 7?

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

MongoDB Duplicate Documents even after adding unique key

How do I call a php file with axios?

Converting alphabet letter to alphabet position in PHP [duplicate]

Message: Set sys_temp_dir in your php.ini after installed composer

Natural ORDER in Laravel Eloquent ORM

Laravel insert dynamic input values with radio button

Only on Firefox "Loading failed for the <script> with source"

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

About Contact Privacy policy Terms and conditions