22 lines
501 B
PHP
22 lines
501 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class QuanTicket extends Model
|
|
{
|
|
use HasDateTimeFormatter;
|
|
protected $table = 'quan_tickets';
|
|
|
|
public function cateValue(){
|
|
return $this->belongsToMany(GoodsCategory::class, 'quan_cate_values', 'quan_id', 'category_id');
|
|
}
|
|
|
|
public function goodsValue(){
|
|
return $this->belongsToMany(Good::class, 'quan_goods_values', 'quan_id', 'goods_id');
|
|
}
|
|
}
|