Updated City Model and Resource.
This commit is contained in:
@@ -19,6 +19,7 @@ class CityResource extends JsonResource
|
|||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'uuid' => $this->uuid,
|
'uuid' => $this->uuid,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
|
'url' => $this->url,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,10 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class City extends Model
|
class City extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'uuid',
|
||||||
|
'name',
|
||||||
|
'url',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ return new class extends Migration
|
|||||||
$table->id();
|
$table->id();
|
||||||
$table->string('uuid');
|
$table->string('uuid');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
|
$table->string('url');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user