✏️ Edit: City.php
Path:
/home/thiqat5/electronics.thiqatech.com/platform/plugins/location/src/Models/City.php
Size: 990 B · Modified: 2022-04-22 10:13:56 · Perm: 0644 · Writable
← Back to directory
👁 View
⬇ Download
<?php namespace Botble\Location\Models; use Botble\Base\Traits\EnumCastable; use Botble\Base\Enums\BaseStatusEnum; use Botble\Base\Models\BaseModel; use Illuminate\Database\Eloquent\Relations\BelongsTo; class City extends BaseModel { use EnumCastable; /** * The database table used by the model. * * @var string */ protected $table = 'cities'; /** * @var array */ protected $fillable = [ 'name', 'state_id', 'country_id', 'record_id', 'order', 'is_default', 'status', ]; /** * @var array */ protected $casts = [ 'status' => BaseStatusEnum::class, ]; /** * @return BelongsTo */ public function state() { return $this->belongsTo(State::class)->withDefault(); } /** * @return BelongsTo */ public function country() { return $this->belongsTo(Country::class)->withDefault(); } }
💾 Save
Cancel
Save as UTF-8, newlines normalized to LF