2018 Solution, still other answers are valid but you dont need to use any dependency:
First you have to create a new migration:
php artisan make:migration change_appointment_time_column_type
Then in that migration file up()
, try:
Schema::table('appointments', function ($table) {
$table->string('time')->change();
});
If you donot change the size default will be varchar(191)
but If you want to change size of the field:
Schema::table('appointments', function ($table) {
$table->string('time', 40)->change();
});
Then migrate the file by:
php artisan migrate