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

775
Views
DataTables warning: table id=users-table- Ajax error. laravel 8

I am using jquery ajax datatable. I dont know why this error appears to my browser. I think my code doesn't have an error. Can someone know what is the mistake in this?

Error that i get DataTables warning: table id=users-table - Ajax error. For more information about this error, please see http://datatables.net/tn/7

  public function datatables()
    {

        $booking = Booking::with('users','rooms')
        ->select(['id','user_id','room_id','start_datetime','end_datetime','points','price'])- 
         >OrderBy('created_at','DESC');

        return Datatables::of($booking)

        ->addColumn('startEndDateColumn', function($row){
            $time = new DateTime($row->start_datetime);
            $start_date = $time->format('j-n-Y');

            $time = new DateTime($row->end_datetime);
            $end_date = $time->format('j-n-Y');

            return $start_date . ' - ' . $end_date;
        })
        ->addColumn('startEndTimeColumn', function($row){
            $time = new DateTime($row->start_datetime);
            $start_time = $time->format('h:i a');

            $time = new DateTime($row->end_datetime);
            $end_time = $time->format('h:i a');

            return $start_time . ' - ' . $end_time;
        })
        ->make(true);
    }
over 4 years ago · Santiago Trujillo
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!