Laravel4 migration column type of Date of Birth

Tanveer

I am very new in laravel.So this is gonna be very basic question.My question is what should be the column type in migration to create Date of Birth column.For example,I have created a migration file for Blood Donation,where the columns are something like that,

        $table->increments('id');
        $table->unsignedInteger('donner_id');
        $table->foreign('donner_id')->references->('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
        $table->string('name');
        $table->string('email')->unique();
        $table->string('blood_group');
        $table->string('phone_number')->unique();
        $table->string('location');
        $table-> ------('date_of_birth');
        $table->timestamps();

you can see that laravel4 migration uses 'string' type instead of 'varchar'.so what should be the type of Date of birth column in laravel 4 ?

Laurence

Date would be the most suitable

$table->date('date_of_birth');

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Date of birth saving to MYSQL DB with timestamp or date column type

From Dev

Image field column type in laravel4

From Dev

laravel4 add checkbox column in database using migration file

From Dev

How to change enum type column in laravel migration?

From Dev

change a column from birth date to age in r

From Dev

What is the best way to change a column type in Laravel migration?

From Dev

Laravel migration array type (store array in database column)

From Dev

Laravel 5.8 getting error when "char" type column migration

From Dev

Rails Migration Column Type Polymorphic

From Dev

How do I avoid date type column of MSSQL INTO PIVOTAL HAWQ null at DBMS migration

From Dev

How do I avoid date type column of MSSQL INTO PIVOTAL HAWQ null at DBMS migration

From Dev

Laravel4 Date based actions

From Dev

select date of birth dialog

From Dev

Adding date of birth to database

From Dev

Date Of Birth + Birthday SQL

From Dev

DatePicker validation for Date of Birth

From Dev

Check for Birth Date

From Dev

Laravel 5 : How to use simple birth date middleware(before filter)?

From Dev

JavaScript form validation for ensuring a date of birth is 4 digits long

From Dev

Change file "Birth date" for ext4 files?

From Dev

How change column type works in rails migration

From Dev

How to change data type and add column with migration without losing data? (laravel 5.3)

From Dev

Relation 1-1 in hibernate not working : unknown column account0_.date_of_birth

From Dev

Change the Range of Year Values within Date Type to Accommodate Possible Birth Years Rails, Simple_Form, HTML

From Dev

flyway migration on existing database results in "wrong column type encountered in column"

From Dev

Validation for Birth Date, Joining Date and Leaving Date

From Dev

With Laravel Migration, How to change data type of a column and update its existing data to fit the new data type, without using raw SQL queries?

From Dev

Validating Age from the Date of Birth

From Dev

Calculate age from birth date

Related Related

  1. 1

    Date of birth saving to MYSQL DB with timestamp or date column type

  2. 2

    Image field column type in laravel4

  3. 3

    laravel4 add checkbox column in database using migration file

  4. 4

    How to change enum type column in laravel migration?

  5. 5

    change a column from birth date to age in r

  6. 6

    What is the best way to change a column type in Laravel migration?

  7. 7

    Laravel migration array type (store array in database column)

  8. 8

    Laravel 5.8 getting error when "char" type column migration

  9. 9

    Rails Migration Column Type Polymorphic

  10. 10

    How do I avoid date type column of MSSQL INTO PIVOTAL HAWQ null at DBMS migration

  11. 11

    How do I avoid date type column of MSSQL INTO PIVOTAL HAWQ null at DBMS migration

  12. 12

    Laravel4 Date based actions

  13. 13

    select date of birth dialog

  14. 14

    Adding date of birth to database

  15. 15

    Date Of Birth + Birthday SQL

  16. 16

    DatePicker validation for Date of Birth

  17. 17

    Check for Birth Date

  18. 18

    Laravel 5 : How to use simple birth date middleware(before filter)?

  19. 19

    JavaScript form validation for ensuring a date of birth is 4 digits long

  20. 20

    Change file "Birth date" for ext4 files?

  21. 21

    How change column type works in rails migration

  22. 22

    How to change data type and add column with migration without losing data? (laravel 5.3)

  23. 23

    Relation 1-1 in hibernate not working : unknown column account0_.date_of_birth

  24. 24

    Change the Range of Year Values within Date Type to Accommodate Possible Birth Years Rails, Simple_Form, HTML

  25. 25

    flyway migration on existing database results in "wrong column type encountered in column"

  26. 26

    Validation for Birth Date, Joining Date and Leaving Date

  27. 27

    With Laravel Migration, How to change data type of a column and update its existing data to fit the new data type, without using raw SQL queries?

  28. 28

    Validating Age from the Date of Birth

  29. 29

    Calculate age from birth date

HotTag

Archive