api code global jain
This commit is contained in:
18
app/Models/Traits/Message/Attributes/MessageAttributes.php
Normal file
18
app/Models/Traits/Message/Attributes/MessageAttributes.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits\Message\Attributes;
|
||||
|
||||
use App\Traits\ActionButtons;
|
||||
|
||||
trait MessageAttributes
|
||||
{
|
||||
use ActionButtons;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStatusActionAttribute(): string
|
||||
{
|
||||
return $this->statusLabel($this->status);
|
||||
}
|
||||
}
|
||||
8
app/Models/Traits/Message/Methods/MessageMethods.php
Normal file
8
app/Models/Traits/Message/Methods/MessageMethods.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits\Message\Methods;
|
||||
|
||||
trait MessageMethods
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits\Message\Relationships;
|
||||
|
||||
/**
|
||||
* Trait MessageRelationships
|
||||
* @package Domains\User\Models\Traits\Relationships
|
||||
*/
|
||||
trait MessageRelationships
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function messageThreads()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\MessagesThreads::class,'message_thread_id','id');
|
||||
}
|
||||
}
|
||||
8
app/Models/Traits/Message/Scopes/MessageScope.php
Normal file
8
app/Models/Traits/Message/Scopes/MessageScope.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits\Message\Scopes;
|
||||
|
||||
trait MessageScope
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user