Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

did you create the tables manually or using migrations? if migrations, did you use boolean or tinyint(1)?

Also check where you are setting this value and how?

0

As I mentioned above, it is generated with migrations and I used boolean method (as I mentioned above).

0

What about the difference in DBs between local and server

0

What about the difference in DBs between local and server

0

Localhost: mysql Ver 15.1 Distrib 10.0.20-MariaDB, for Linux (x86_64) using readline 5.1

Server: mysql Ver 15.1 Distrib 10.0.20-MariaDB, for Linux (x86_64) using readline 5.1

The problem is that it does not query at all.

0

localhost server

Guys i realized something. Types of the every attributes are strings, which is not normal I suppose.

0

check your db schema. also consider using eloquent's attribute casting. so the status is always stored as an int rather than a string.

but still where status = 1 is the same as status = "1" if you are storing the status as string.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.