ApiKeys   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUserName() 0 4 1
1
<?php
2
3
/**
4
 * @Author: ahmadnorin
5
 * @Date:   2017-11-28 00:17:29
6
 * @Last Modified by:   ahmadnorin
7
 * @Last Modified time: 2017-11-28 09:44:35
8
 */
9
10
namespace App;
11
12
use Illuminate\Notifications\Notifiable;
13
use Illuminate\Database\Eloquent\SoftDeletes;
14
use Illuminate\Database\Eloquent\Model;
15
16
class ApiKeys extends Model
17
{
18
    use Notifiable;
19
    use SoftDeletes;
20
    protected $table = "api_keys";
21
    protected $dates = ['deleted_at'];
22
    protected $fillable = [
23
        'client', 'api_key', 'created_at', 'updated_at'
24
    ];
25
26
    public $hidden = ['created_at', 'updated_at'];
27
28
    public function getUserName()
29
    {
30
        return $this->belongsTo('App\User','user_id','id');
31
    }
32
}
33