35 lines
618 B
PHP
35 lines
618 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Items extends Model
|
|
{
|
|
protected $table = 'items';
|
|
|
|
protected $primaryKey = 'iditems';
|
|
|
|
protected $fillable = [
|
|
'item_desc',
|
|
'item_min_bid',
|
|
'item_est_value',
|
|
'item_assigned_num',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function winningBids()
|
|
{
|
|
return $this->belongsTo(WinningBids::class, 'iditems', 'winning_item_num');
|
|
}
|
|
}
|