Sitio::girls()   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
7
class Sitio extends Base
8
{
9
10
    /**
11
     * The attributes that are mass assignable.
12
     *
13
     * @var array
14
     */
15
    protected $fillable = [
16
        'name',
17
        'url',
18
        'sitio_id'
19
    ];
20
21
    protected $mappingProperties = array(
22
        'name' => [
23
            'type' => 'string',
24
            "analyzer" => "standard",
25
        ],
26
        'url' => [
27
            'type' => 'string',
28
            "analyzer" => "standard",
29
        ],
30
        'sitio_id' => [
31
            'type' => 'string',
32
            "analyzer" => "standard",
33
        ],
34
    );
35
36
    /**
37
     * Get all of the businesses that are assigned this tag.
38
     */
39
    public function businesses()
40
    {
41
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec-tools.models.business', \Telefonica\Models\Actors\Business::class), 'sitioable');
42
    }
43
44
    /**
45
     * Get all of the girls that are assigned this tag.
46
     */
47
    public function girls()
48
    {
49
        return $this->morphedByMany('Population\Models\Market\Actors\Girl', 'sitioable');
50
    }
51
52
    /**
53
     * Get all of the users that are assigned this tag.
54
     */
55
    public function users()
56
    {
57
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'sitioable');
58
    }
59
60
    /**
61
     * Aparece em videos
62
     */
63
    public function videos()
64
    {
65
        return $this->morphedByMany('Stalker\Models\Video', 'sitioable');
66
    }
67
}
68