Convert query to RAW query

Asked

Viewed 22 times

-1

What this query looks like in Mysql RAW format?

$user = User::query()
        ->where(static function ($query) use ($indicador) {
            $query->where('indicador_id', $indicador)
                ->orWhere('level_ref', $indicador)
                ->orWhere('id', $indicador);
        })
        ->where('level_cnt', '<', $hLimit)
        ->when($id != -1, static function ($query) use ($id) {
            $query->where('id', '!=', $id);
        })
        ->orderBy('id', 'asc')
        ->first();

1 answer

-1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.