Laravel will report an error when using orderBy in eloquent

$datum = Coupon::orderBy("create_at","desc")->get();
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "orders by `create_at` desc" at line 1 (SQL: select * from `st_coupon` where `st_coupon`.`delete_at` is null orders by `create_at` desc)

laravel version 5.6 php 7.2

is the reason why the database operation compiles orderBy to orders by,?

Mar.21,2021

I ask two questions:
whether 1.created_at is created_at?
where the 2.sqlwhere statement comes from, and whether the code is not fully pasted

Menu