Phone::users()   A
last analyzed

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 Telefonica\Models\Digital;
4
5
use Pedreiro\Models\Base;
6
use Muleta\Traits\Models\ComplexRelationamentTrait;
7
8
class Phone extends Base
9
{
10
11
    /**
12
     * The attributes that are mass assignable.
13
     *
14
     * @var array
15
     */
16
    protected $fillable = [
17
        'number',
18
    ];
19
20
    protected $mappingProperties = array(
21
        /**
22
         * User Info
23
         */
24
        'number' => [
25
            'type' => 'string',
26
            "analyzer" => "standard",
27
        ],
28
    );
29
    
30
    /**
31
     * Get all of the slaves that are assigned this tag.
32
     */
33
    public function persons()
34
    {
35
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.person', \Telefonica\Models\Actors\Person::class), 'phoneable');
36
    }
37
38
    /**
39
     * Get all of the users that are assigned this tag.
40
     */
41
    public function users()
42
    {
43
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'phoneable');
44
    }
45
}
46