SimulatorHistory::getUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
    /**
15
     * @var string
16
     */
17
    protected $table = "simulator_history";
18
19
    /**
20
     * The attributes that are mass assignable.
21
     *
22
     * @var array
23
     */
24
    protected $fillable = [
25
        'user_id',
26
        'name',
27
        'quantity_to_buy',
28
        'quote_to_buy',
29
        'price_to_buy',
30
        'quantity_to_sell',
31
        'quote_to_sell',
32
        'tax_percent_to_discount',
33
        'price_to_sell',
34
        'gains_or_losses'
35
    ];
36
37
38
    /**
39
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
40
     */
41
    public function getUser()
42
    {
43
        return $this->belongsTo(User::class);
44
    }
45
46
47
}
48