'integer', 'student_id' => 'integer', 'score' => 'decimal:2', // change to 'integer' if score is whole number 'created_by' => 'integer', 'updated_by' => 'integer', ]; /* Optional relationships */ public function batch() { return $this->belongsTo(PlacementBatch::class, 'batch_id'); } public function student() { return $this->belongsTo(Student::class, 'student_id'); } public function creator() { return $this->belongsTo(User::class, 'created_by'); } public function updater() { return $this->belongsTo(User::class, 'updated_by'); } }