Where correct word

Posted 3 months ago by tuyenlaptrinh

Hello Everyone. I have a question. I can not solve it.

I have this database

+--------+---------------+
|    id  |      name     |
+--------+---------------+
|    1   |     backup    |
+--------+---------------+
|    2   |     BACKUP    |
+--------+---------------+

My Model is Post I use where clause to find name called backup

Post::where('name','backup')->get();

But i got 2 posts not 1 post

Please help me this problem Thank you

Please sign in or create an account to participate in this conversation.