Initial commit
This commit is contained in:
23
app/Models/Comment.php
Normal file
23
app/Models/Comment.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
|
||||
class Comment extends Model
|
||||
{
|
||||
protected $guarded = [
|
||||
'id'
|
||||
];
|
||||
public function userInfo(): HasOne
|
||||
{
|
||||
return $this->hasOne(User::class);
|
||||
}
|
||||
public function projectStatus(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ProjectStatus::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user