@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | * @param $name |
28 | 28 | * @return |null |
29 | 29 | */ |
30 | - public static function getByName($name){ |
|
30 | + public static function getByName($name) { |
|
31 | 31 | $result = self::where('name', $name)->first(); |
32 | - if(!empty($result)){ |
|
32 | + if (!empty($result)) { |
|
33 | 33 | return $result->value; |
34 | 34 | } |
35 | - else{ |
|
35 | + else { |
|
36 | 36 | return null; |
37 | 37 | } |
38 | 38 | } |
@@ -50,21 +50,21 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @var array |
52 | 52 | */ |
53 | - protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
53 | + protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ]; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * The attributes that are mass assignable. |
57 | 57 | * |
58 | 58 | * @var array |
59 | 59 | */ |
60 | - protected $fillable = ['name', 'value', 'description']; |
|
60 | + protected $fillable = [ 'name', 'value', 'description' ]; |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Columns to exclude from index |
64 | 64 | * |
65 | 65 | * @var array |
66 | 66 | */ |
67 | - protected $excludedFromIndex = []; |
|
67 | + protected $excludedFromIndex = [ ]; |
|
68 | 68 | |
69 | 69 | /** |
70 | 70 | * Fields to search in fulltext mode |
@@ -31,8 +31,7 @@ |
||
31 | 31 | $result = self::where('name', $name)->first(); |
32 | 32 | if(!empty($result)){ |
33 | 33 | return $result->value; |
34 | - } |
|
35 | - else{ |
|
34 | + } else{ |
|
36 | 35 | return null; |
37 | 36 | } |
38 | 37 | } |