Ignore Space in Table Column When Searching For A Match

PHOTO EMBED

Wed Nov 16 2022 11:25:06 GMT+0000 (Coordinated Universal Time)

Saved by @eneki

    public function getSystemUsersByPhone($phone)
    {
        return $this->user->whereRaw("REPLACE(`phone`, ' ' ,'') LIKE ?", ['%'.str_replace(' ', '', $phone).'%'])->first();
    }
content_copyCOPY