Completed
Push — master ( d287d6...1f93a6 )
by Nasrul Hazim
01:54
created

BankAccount   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bank() 0 3 1
A getBankNameAttribute() 0 3 1
1
<?php
2
3
namespace CleaniqueCoders\Profile\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class BankAccount extends Model
8
{
9
    protected $guarded = ['id'];
10
11
    /**
12
     * [bank description].
13
     *
14
     * @return [type] [description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
15
     */
16
    public function bank()
17
    {
18
        return $this->belongsTo(Bank::class)->withDefault();
19
    }
20
21
    /**
22
     * Get Bank Name via Accessor.
23
     *
24
     * @return string
25
     */
26
    public function getBankNameAttribute()
27
    {
28
        return $this->bank->name;
29
    }
30
}
31