John Davidson

php - Should I add ' before integers when making an ENUM field

0 comments
Message:


I want to create a Migration and this Migration has a field named is_active which takes one of 1 or 0 values.


So I tried:


$table->enum('is_active', ['0', '1']);

But I wonder, if this alright or I should write it this way:


$table->enum('is_active', [0, 1]);

So which one is true ?



My Answer:
more context to your question? It is not clear what you are asking about adding in PHP.

Rate this post

5 of 5 based on 3184 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us