Updated City Model and Resource.

This commit is contained in:
2023-06-14 13:36:40 +03:00
parent 6d0423fa34
commit 1dcf619555
3 changed files with 8 additions and 0 deletions
@@ -19,6 +19,7 @@ class CityResource extends JsonResource
'id' => $this->id,
'uuid' => $this->uuid,
'name' => $this->name,
'url' => $this->url,
];
}
}
+6
View File
@@ -8,4 +8,10 @@ use Illuminate\Database\Eloquent\Model;
class City extends Model
{
use HasFactory;
protected $fillable = [
'uuid',
'name',
'url',
];
}
@@ -15,6 +15,7 @@ return new class extends Migration
$table->id();
$table->string('uuid');
$table->string('name');
$table->string('url');
$table->timestamps();
});
}