Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Passing old value array laravel in Javascript

im struggling to pass laravel 8 array value in javascript variable with function old(). this is when store the data

"date" => array:4 [▼
        0 => "2022-03-28"
        1 => "2022-03-29"
        2 => "2022-03-30"
        3 => "2022-03-31"
      ]

however it some error with the validation. i need to get back the value throught javascript. but i can't get the value back. here is the code

$(document).ready(function(){   
    var total_row = 4; 

    for (let row = 0; row < total_row; row++) { 
        var getOld_value =  {{ json_encode(old( '"date."+row+' )) }};  

        console.log(getOld_value);
    }

});

all return is null.. how do i able to get the value on javascript.

please help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!