mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:51:07 +03:30
fix: change models namespace
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Message extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
public $fillable = ['title', 'text', 'status', 'recipient_user_id', 'sender_user_id'];
|
||||
|
||||
public function sender_user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'sender_user_id');
|
||||
}
|
||||
|
||||
public function recipient_user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'recipient_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user