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

187
Views
Laravel <x-component> with javascript

I have this blade file with a simple html table:

<div class="table-responsive datatable-custom">
    <table class="table table-borderless table-thead-bordered table-nowrap table-text-center table-align-middle card-table">
        <thead class="thead-light">
            <th>TOTALS</th>
        </thead>
        <tbody id="table-body">
        </tbody>
    </table>
</div>

I'm calling my api by axios, is possible to use a laravel or do they only work for laravel?

axios.get('/api/contacts')

.then(function (response) {

    let json = response.data;

    let tableText = "";
    json.leads.forEach((row) => {
        tableText += "<tr>";
        tableText += "<td><x-js.modal totals="here my javascript data"></x-js.modal></td>";  <!-- here my laravel x-component
        tableText += "</tr>";
    });

    document.getElementById('table-body').innerHTML = tableText;
    })
    .catch(function (error) {
    console.log(error);
    })
    .finally(function () {
});
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!