Completed
Push — master ( bf4c92...3d0f9a )
by Alex
04:55
created

SimulatorHistory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 34
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUser() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class SimulatorHistory
9
 * @package App
10
 */
11
class SimulatorHistory extends Model
12
{
13
14
    protected $table = "simulator_history";
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $fillable = [
22
        'user_id',
23
        'name',
24
        'quantity_to_buy',
25
        'quote_to_buy',
26
        'price_to_buy',
27
        'quantity_to_sell',
28
        'quote_to_sell',
29
        'tax_percent_to_discount',
30
        'price_to_sell',
31
        'gains_or_losses'
32
    ];
33
34
35
    /**
36
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
37
     */
38
    public function getUser()
39
    {
40
        return $this->belongsTo(User::class);
41
    }
42
43
44
}
45