25 lines
457 B
PHP
25 lines
457 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AssignmentPin extends Model
|
|
{
|
|
protected $fillable = [
|
|
'assignment_id',
|
|
'student_id',
|
|
];
|
|
|
|
public function assignment(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Assignment::class);
|
|
}
|
|
|
|
public function student(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Student::class);
|
|
}
|
|
}
|