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

In terms of the migration file, you could just manually handle the alter/create table using DB::unprepared() possibly.

0

Actually, Eloquent handles SET type as text, since it is stored as such.

Don't think there is an easy way to handle it correctly with Eloquent. I'm going to store integers (despite it makes it harder to read in the DB) and use logical operators for comparisons and values checks with PHP constants (if it's not readable in the DB, at least it will be in the code).

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Arcesilas arcesilas Joined 26 Nov 2014

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.