Small bugs have been fixed

This commit is contained in:
Kamil Niemczycki 2022-02-18 12:09:35 +01:00
parent b553799049
commit 7cb6b100a0
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class Project extends Model
public function getReleaseDateAttribute($value): String
{
return $value;
return Carbon::parse($value)->format('Y-m-d');
}
public function setReleaseDateAttribute($value): void
@ -54,7 +54,7 @@ class Project extends Model
public function getUpdateDateAttribute($value): String|null
{
return $value;
return Carbon::parse($value)->format('Y-m-d');
}
public function setUpdateDateAttribute($value): void

View File

@ -21,7 +21,7 @@ class CreateProjectsTable extends Migration
$table->string('title', 255);
$table->json('categories')->nullable()->default(null);
$table->string('author', 30);
$table->json('images')->nullable()->default('{"small":"","medium":"","large":""}');
$table->json('images')->nullable()->default(null);
$table->dateTimeTz('release_date')->nullable()->useCurrent();
$table->dateTimeTz('update_date')->nullable()->default(null);
$table->string('project_url', 255)->nullable()->default(null);