If you want to quickly output an Eloquent query in its SQL form, you can invoke the toSql() method onto it like so
$invoices = Invoice::where('client', 'James pay')->toSql();
dd($invoices)
// select * from `invoices` where `client` = ?
If you want to quickly output an Eloquent query in its SQL form, you can invoke the toSql() method onto it like so
$invoices = Invoice::where('client', 'James pay')->toSql();
dd($invoices)
// select * from `invoices` where `client` = ?