Updated City Model and Resource.

main
KKlochko 2 years ago
parent 6d0423fa34
commit 1dcf619555

@ -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();
}); });
} }

Loading…
Cancel
Save