time laravel migration code example
Example 1: current time in laravel migration
$table->timestamp('column_name')->useCurrent();
Example 2: laravel drop column
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('votes');
});
Example 3: datetime-local laravel migration data type
public function getDateStartAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}
public function getDateEndAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}