A
A
Alex Oreshko2019-04-19 22:23:07
Laravel
Alex Oreshko, 2019-04-19 22:23:07

How to find matches in the database?

I execute this code:

public function getuserstat($name){
        $logsall = logs_all::all()->where('Text', 'like', '%'.$name.' %');
        dd($logsall);
        return view('admin/get/user', compact('logsall');
    }

But it doesn't find anything in the database.
DB:
5cba2012c75f7373657733.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-04-19
@AlexIopi

I suggest reading in the documentation what the method does all()and think a little.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question