:::

7-9 app\OrderItem.php

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class OrderItem extends Model
{
    public function product()
    {
        return $this->belongsTo('App\Product');
    }

    public function order()
    {
        return $this->belongsTo('App\Order');
    }
}

 


:::

書籍目錄

展開 | 闔起

http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D45%26tbdsn%3D1539

計數器

今天: 1302130213021302
昨天: 2138213821382138
總計: 7322584732258473225847322584732258473225847322584