Answers for "laravel date migration type"

PHP
3

laravel migration update table column type

Schema::table('users', function ($table) {
    $table->string('name', 50)->change();
});
We could also modify a column to be nullable:

Schema::table('users', function ($table) {
    $table->string('name', 50)->nullable()->change();
});
Posted by: Guest on July-31-2021
0

datetime-local laravel migration data type

public function getDateStartAttribute($value)
{
    return Carbon::parse($value)->format('Y-m-dTH:i');
}

public function getDateEndAttribute($value)
{
    return Carbon::parse($value)->format('Y-m-dTH:i');
}
Posted by: Guest on December-11-2020

Code answers related to "laravel date migration type"

Browse Popular Code Answers by Language