Support the ongoing development of Laravel.io →
Requests Laravel Eloquent
Last updated 2 years ago.
0
moderator Solution

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

1

Yes, you're right Sir. I'm sorry for my bad.it's already solved. Thank you a lot

tvbeek liked this reply

1

Sign in to participate in this thread!

Eventy

Your banner here too?

qlixes qlixes Joined 11 Sep 2019

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.