Backslash in Laravel database requests

If you write \ in the Laravel database request incorrectly, you won't get the expected result.

The point is that \ is an escape character.

For example, if you need to get a model from the database with the App\Picture type:

ModelName::where('type', 'like', 'App\\\\Picture')->get()

As you can see from the code above, the single slash is replaced with 4: \\\\


No comments yet, you can leave yours: