Setting   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A scopeValue() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Setting extends Model
8
{
9
	 protected $table = 'trn_settings';
10
11
	 protected $fillable = [
12
	 		'key',
13
	 		'value',
14
	 ];
15
16
	 const CREATED_AT = null;
17
18
	// Issue to be fixed
19
	 public function scopeValue($query)
20
	 {
21
	 	return $query->where('value','=','xyz')->pluck('key');
22
	 }
23
}