:::

2-1 /app/Exam.php

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Exam extends Model
{
    protected $fillable = [
        'title', 'user_id', 'enable',
    ];

    protected $casts = [
        'enable' => 'boolean',
    ];

    public function topics()
    {
        return $this->hasMany('App\Topic');
    }

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

 


:::

書籍目錄

展開 | 闔起

快速登入


http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1311%26tbsn%3D41

計數器

今天: 721721721
昨天: 8625862586258625
總計: 8031328803132880313288031328803132880313288031328