Penambahan FrontEnd All-New-Manufacture
This commit is contained in:
31
app/Models/StikerTransDetail.php
Normal file
31
app/Models/StikerTransDetail.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class StikerTransDetail extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'detail_transaksi_stiker';
|
||||
|
||||
protected $fillable = [
|
||||
'notrans', 'nopol', 'jenis_mobil', 'adm', 'kategori',
|
||||
'jenis_member', 'akses', 'akses_out', 'status', 'merk',
|
||||
'tipe', 'tahun', 'warna', 'keterangan',
|
||||
];
|
||||
|
||||
public function stiker_details ()
|
||||
{
|
||||
return $this->belongsTo(StikerTrans::class, 'notrans', 'notrans');
|
||||
}
|
||||
|
||||
// Relasi ke tabel jenis_mobil
|
||||
public function vehicle()
|
||||
{
|
||||
return $this->belongsTo(JenisMobil::class, 'id', 'jenis_mobil');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user