ProjectMemberPivot.php
760 Bytes
<?php
namespace App\Models\Pivots;
use App\Models\Project;
use App\Models\User;
use App\Support\Model;
use Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class ProjectMemberPivot extends Model
{
use SoftDeletes;
protected $table = 'project_has_members';
protected $guarded = [];
/**
* @return \Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo
*/
public function project(): BelongsTo
{
return $this->belongsTo(Project::class)->withTrashed();
}
/**
* @return \Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class)->withTrashed();
}
}