Inquiry   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A service() 0 3 1
A product() 0 3 1
A software() 0 3 1
1
<?php
2
3
namespace Adminetic\Website\Models\Admin;
4
5
use Illuminate\Database\Eloquent\Factories\HasFactory;
6
use Illuminate\Database\Eloquent\Model;
7
8
class Inquiry extends Model
9
{
10
    use HasFactory;
11
12
    protected $guarded = [];
13
14
    // Casts
15
    protected $casts = [
16
        'data' => 'array',
17
    ];
18
19
    public function __construct(array $attributes = [])
20
    {
21
        $this->table = config('website.table_prefix', 'website').'_inquiries';
22
23
        parent::__construct($attributes);
24
    }
25
26
    // Relationships
27
    public function product()
28
    {
29
        return $this->belongsTo(Product::class);
30
    }
31
32
    public function software()
33
    {
34
        return $this->belongsTo(Software::class);
35
    }
36
37
    public function service()
38
    {
39
        return $this->belongsTo(Service::class);
40
    }
41
}
42