diff --git a/app/Http/Resources/API/v2/CityResource.php b/app/Http/Resources/API/v2/CityResource.php index e02c2cd..f0776cc 100644 --- a/app/Http/Resources/API/v2/CityResource.php +++ b/app/Http/Resources/API/v2/CityResource.php @@ -19,6 +19,7 @@ class CityResource extends JsonResource 'id' => $this->id, 'uuid' => $this->uuid, 'name' => $this->name, + 'url' => $this->url, ]; } } diff --git a/app/Models/City.php b/app/Models/City.php index fe7fda8..aeaa28a 100644 --- a/app/Models/City.php +++ b/app/Models/City.php @@ -8,4 +8,10 @@ use Illuminate\Database\Eloquent\Model; class City extends Model { use HasFactory; + + protected $fillable = [ + 'uuid', + 'name', + 'url', + ]; } diff --git a/database/migrations/2023_06_13_154936_create_cities_table.php b/database/migrations/2023_06_13_154936_create_cities_table.php index 0e935fd..018d2e1 100644 --- a/database/migrations/2023_06_13_154936_create_cities_table.php +++ b/database/migrations/2023_06_13_154936_create_cities_table.php @@ -15,6 +15,7 @@ return new class extends Migration $table->id(); $table->string('uuid'); $table->string('name'); + $table->string('url'); $table->timestamps(); }); }