W
W
WebDev2016-10-14 13:01:16
Laravel
WebDev, 2016-10-14 13:01:16

How to process raw request data in laravel?

There is a raw query like

$query->orWhere(\DB::raw("REPLACE (`name`, ' ', '')"), 'LIKE', '%'.$name.'%');

How is it customary to process incoming data in such cases?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Plisko, 2016-10-14
@kirill-93

Explain the question. If about DB::raw, then it supports placeholders and it accepts data as the second parameter. https://laravel.com/docs/5.2/database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question