31 lines
602 B
PHP
31 lines
602 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class PaketOngkirKota extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $table = 'paket_ongkir_kota';
|
|
|
|
protected $fillable = [
|
|
'paket_id',
|
|
'nama_kota',
|
|
'biaya_ongkir',
|
|
'status'
|
|
];
|
|
|
|
protected $casts = [
|
|
'biaya_ongkir' => 'decimal:2',
|
|
'status' => 'boolean'
|
|
];
|
|
|
|
public function paket()
|
|
{
|
|
return $this->belongsTo(Paket::class);
|
|
}
|
|
}
|