33 lines
574 B
PHP
33 lines
574 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Module extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* Mass assignable attributes.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'course_id',
|
|
'module_code',
|
|
'title',
|
|
'semester',
|
|
'credits',
|
|
'description',
|
|
];
|
|
|
|
/**
|
|
* Get the course that owns the module.
|
|
*/
|
|
public function course()
|
|
{
|
|
return $this->belongsTo(Course::class);
|
|
}
|
|
} |