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

Website   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
dl 0
loc 20
rs 10
c 1
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRouteKeyName() 0 3 1
A websiteable() 0 3 1
1
<?php
2
3
namespace CleaniqueCoders\Profile\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Website extends Model
8
{
9
    protected $guarded = [];
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 websiteable models.
23
     */
24
    public function websiteable()
25
    {
26
        return $this->morphTo();
27
    }
28
}
29