Setting::scopeValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 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
}