first commit

This commit is contained in:
2026-06-10 10:46:22 +05:45
commit 473bdd627b
136 changed files with 19074 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $fillable = [
'registration_id',
'comment',
];
/*
|---------------------------
| Relationships
|---------------------------
*/
// Comment belongs to a student
public function registration()
{
return $this->belongsTo(Registration::class);
}
/*
|---------------------------
| Helper methods
|---------------------------
*/
// Optional: short preview for UI
public function getPreviewAttribute()
{
return strlen($this->comment) > 50
? substr($this->comment, 0, 50) . '...'
: $this->comment;
}
}