Completed
Push — master ( 7f6216...ac54c1 )
by Freek
01:23
created

CampaignOpen::campaignSend()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Spatie\EmailCampaigns\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\BelongsTo;
7
8
class CampaignOpen extends Model
9
{
10
    protected $guarded = [];
11
12
    public function campaignSend(): BelongsTo
13
    {
14
        return $this->belongsTo(CampaignSend::class, 'email_campaign_send_id');
15
    }
16
17
    public function campaign(): BelongsTo
18
    {
19
        return $this->belongsTo(Campaign::class, 'email_campaign_id');
20
    }
21
22
    public function subscriber(): BelongsTo
23
    {
24
        return $this->belongsTo(Subscriber::class, 'email_list_subscriber_id');
25
    }
26
}
27