The raw method doesn't have a second parameter, see: https://laravel.com/api/8.x/Illuminate/Database/Query/Builder.html#method_raw
I think you can use the whereRaw function:
$response = DB::table('user_score_events')
->whereRaw("score_daily = '?'", [$request->start_date]))
->get()
;
See the documentation for more raw options: https://laravel.com/docs/8.x/queries#raw-expressions
qlixes liked this reply
Yes, you're right Sir. I'm sorry for my bad.it's already solved. Thank you a lot
tvbeek liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community