try this instead
$results = DB::table('workers')->get();
return view('payslips')->with('data',$results);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I'm trying to query some Arabic records using this code:
$pdo = DB::getPdo();
$statement = $pdo->prepare('select * from workers');
$statement->setFetchMode(\PDO::FETCH_ASSOC);
$statement->execute();
$results = $statement->fetchAll();
return view('payslips')->with('data', $results);
The Arabic text return as "" and can't see the values when I dd($results) I only see the english ones.
Checked the database and everything is there showing correctly but when I use Laravel to query it does that.
Please I need your help to find out why it returns empty strings instead of the actual Arabic text.
Thank You.
try this instead
$results = DB::table('workers')->get();
return view('payslips')->with('data',$results);
Please or to participate in this conversation.