Completed
Push — master ( 151ac3...e86d1c )
by Nasrul Hazim
04:04
created

Email::getRouteKeyName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CleaniqueCoders\Profile\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Email extends Model
8
{
9
    protected $guarded = ['id'];
10
11
    /**
12
     * Get the route key for the model.
13
     *
14
     * @return string
15
     */
16
    public function getRouteKeyName()
17
    {
18
        return 'hashslug';
19
    }
20
21
    /**
22
     * Get all of the owning emailable models.
23
     */
24
    public function emailable()
25
    {
26
        return $this->morphTo();
27
    }
28
}
29