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 ?
Date would be the most suitable
$table->date('date_of_birth');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With