How to implement 'LIKE' functionality in select constructor

How to implement 'LIKE' functionality in select constructor

lol_userlol_user Posts: 10Questions: 4Answers: 0

After trying to find the answer with no success i'm asking the question here.
To realize the code like this :

      select .... from ports where login = '$logincontents'

I use this code:

        if ($request->on_login == 1) { $wherepart = $wherepart + ['login' => $logincontents];}
        return Datatables::of(Port::select('bla bla bla...')->where($wherepart)->make(true);

which works good . But i need to implement the same with LIKE:

   select ... from ports where login LIKE '%$logincontents%'

Is that possible in reality?

Replies

This discussion has been closed.