@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('sd_contract_asset_relations', function (Blueprint $table) { |
|
15 | + Schema::create('sd_contract_asset_relations', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('contract_id')->unsigned()->nullable(); |
18 | 18 | $table->foreign('contract_id')->references('id')->on('sd_contracts'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('sd_change_release', function (Blueprint $table) { |
|
15 | + Schema::create('sd_change_release', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('change_id')->unsigned()->nullable(); |
18 | 18 | $table->foreign('change_id')->references('id')->on('sd_changes'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('sd_cab_votes', function (Blueprint $table) { |
|
15 | + Schema::create('sd_cab_votes', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('cab_id')->unsigned()->nullable(); |
18 | 18 | $table->foreign('cab_id')->references('id')->on('sd_cab'); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * common |
16 | 16 | */ |
17 | - 'show'=>'Show', |
|
17 | + 'show'=>'Show', |
|
18 | 18 | 'edit'=>'Edit', |
19 | 19 | |
20 | 20 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | 'vote'=>'Vote', |
367 | 367 | 'comment'=>'Comment', |
368 | 368 | 'show-vote'=>'Show Vote', |
369 | - /* |
|
369 | + /* |
|
370 | 370 | |-------------------------------------- |
371 | 371 | | Location Catagory create lang |
372 | 372 | |-------------------------------------- |
@@ -11,16 +11,16 @@ |
||
11 | 11 | 'title', |
12 | 12 | ]; |
13 | 13 | |
14 | - public function field(){ |
|
14 | + public function field() { |
|
15 | 15 | return $this->hasMany('App\Plugins\ServiceDesk\Model\FormBuilder\FormField'); |
16 | 16 | } |
17 | - public function assetType(){ |
|
17 | + public function assetType() { |
|
18 | 18 | return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\AssetFormRelation'); |
19 | 19 | } |
20 | - public function deleteFields(){ |
|
20 | + public function deleteFields() { |
|
21 | 21 | $fields = $this->field()->get(); |
22 | - if($fields->count()>0){ |
|
23 | - foreach($fields as $field){ |
|
22 | + if ($fields->count() > 0) { |
|
23 | + foreach ($fields as $field) { |
|
24 | 24 | $field->delete(); |
25 | 25 | } |
26 | 26 | } |
@@ -21,8 +21,8 @@ |
||
21 | 21 | 'role', |
22 | 22 | ]; |
23 | 23 | |
24 | - public function fieldValue(){ |
|
25 | - return $this->hasMany('App\Plugins\ServiceDesk\Model\FormBuilder\FormValue','field_id'); |
|
24 | + public function fieldValue() { |
|
25 | + return $this->hasMany('App\Plugins\ServiceDesk\Model\FormBuilder\FormValue', 'field_id'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function delete() { |
@@ -43,10 +43,10 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | |
46 | - /** |
|
47 | - * get the description of this model |
|
48 | - * @return string |
|
49 | - */ |
|
46 | + /** |
|
47 | + * get the description of this model |
|
48 | + * @return string |
|
49 | + */ |
|
50 | 50 | public function descriptions() { |
51 | 51 | $value = "--"; |
52 | 52 | $attr = $this->attributes['description']; |
@@ -23,20 +23,20 @@ discard block |
||
23 | 23 | 'contract_end_date', |
24 | 24 | ]; |
25 | 25 | |
26 | - public function getNotifyExpiryAttribute($value){ |
|
27 | - if($value=="0000-00-00 00:00:00"||$value=NULL){ |
|
26 | + public function getNotifyExpiryAttribute($value) { |
|
27 | + if ($value == "0000-00-00 00:00:00" || $value = NULL) { |
|
28 | 28 | $value = "--"; |
29 | 29 | } |
30 | 30 | return $value; |
31 | 31 | } |
32 | - public function getContractStartDateAttribute($value){ |
|
33 | - if($value=="0000-00-00 00:00:00"||$value=NULL){ |
|
32 | + public function getContractStartDateAttribute($value) { |
|
33 | + if ($value == "0000-00-00 00:00:00" || $value = NULL) { |
|
34 | 34 | $value = "--"; |
35 | 35 | } |
36 | 36 | return $value; |
37 | 37 | } |
38 | - public function getContractEndDateAttribute($value){ |
|
39 | - if($value=="0000-00-00 00:00:00"||$value=NULL){ |
|
38 | + public function getContractEndDateAttribute($value) { |
|
39 | + if ($value == "0000-00-00 00:00:00" || $value = NULL) { |
|
40 | 40 | $value = "--"; |
41 | 41 | } |
42 | 42 | return $value; |
@@ -54,16 +54,16 @@ discard block |
||
54 | 54 | $value = str_limit($attr, 10); |
55 | 55 | } |
56 | 56 | if (strlen($value) > 10) { |
57 | - $value .=" <a href=# id='show-description'>Show</a>"; |
|
57 | + $value .= " <a href=# id='show-description'>Show</a>"; |
|
58 | 58 | } |
59 | 59 | return ucfirst($value); |
60 | 60 | } |
61 | 61 | |
62 | - public function contractType(){ |
|
63 | - return $this->belongsTo('App\Plugins\ServiceDesk\Model\Contract\ContractType','contract_type_id'); |
|
62 | + public function contractType() { |
|
63 | + return $this->belongsTo('App\Plugins\ServiceDesk\Model\Contract\ContractType', 'contract_type_id'); |
|
64 | 64 | } |
65 | 65 | |
66 | - public function contractTypes(){ |
|
66 | + public function contractTypes() { |
|
67 | 67 | $value = "--"; |
68 | 68 | $attr = $this->attributes['contract_type_id']; |
69 | 69 | if ($attr) { |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | return ucfirst($value); |
76 | 76 | } |
77 | 77 | |
78 | - public function cab(){ |
|
79 | - return $this->belongsTo('App\Plugins\ServiceDesk\Model\Cab\Cab','approver_id'); |
|
78 | + public function cab() { |
|
79 | + return $this->belongsTo('App\Plugins\ServiceDesk\Model\Cab\Cab', 'approver_id'); |
|
80 | 80 | } |
81 | 81 | |
82 | - public function approvers(){ |
|
82 | + public function approvers() { |
|
83 | 83 | $value = "--"; |
84 | 84 | $attr = $this->attributes['approver_id']; |
85 | 85 | $id = $this->attributes['id']; |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | return ucfirst($value); |
96 | 96 | } |
97 | 97 | |
98 | - public function vendor(){ |
|
99 | - return $this->belongsTo('App\Plugins\ServiceDesk\Model\Vendor\SdVendors','vendor_id'); |
|
98 | + public function vendor() { |
|
99 | + return $this->belongsTo('App\Plugins\ServiceDesk\Model\Vendor\SdVendors', 'vendor_id'); |
|
100 | 100 | } |
101 | 101 | |
102 | - public function vendors(){ |
|
102 | + public function vendors() { |
|
103 | 103 | $value = "--"; |
104 | 104 | $attr = $this->attributes['vendor_id']; |
105 | 105 | if ($attr) { |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | return ucfirst($value); |
113 | 113 | } |
114 | 114 | |
115 | - public function licence(){ |
|
116 | - return $this->belongsTo('App\Plugins\ServiceDesk\Model\Contract\License','license_type_id'); |
|
115 | + public function licence() { |
|
116 | + return $this->belongsTo('App\Plugins\ServiceDesk\Model\Contract\License', 'license_type_id'); |
|
117 | 117 | } |
118 | 118 | |
119 | - public function licenseTypes(){ |
|
119 | + public function licenseTypes() { |
|
120 | 120 | $value = "--"; |
121 | 121 | $attr = $this->attributes['license_type_id']; |
122 | 122 | if ($attr) { |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | return ucfirst($value); |
130 | 130 | } |
131 | 131 | |
132 | - public function product(){ |
|
133 | - return $this->belongsTo('App\Plugins\ServiceDesk\Model\Products\SdProducts','product_id'); |
|
132 | + public function product() { |
|
133 | + return $this->belongsTo('App\Plugins\ServiceDesk\Model\Products\SdProducts', 'product_id'); |
|
134 | 134 | } |
135 | 135 | |
136 | - public function products(){ |
|
136 | + public function products() { |
|
137 | 137 | $value = "--"; |
138 | 138 | $attr = $this->attributes['product_id']; |
139 | 139 | if ($attr) { |
@@ -7,7 +7,7 @@ |
||
7 | 7 | class License extends Model |
8 | 8 | { |
9 | 9 | protected $table = 'sd_license_types'; |
10 | - protected $fillable = ['id','name','created_at','updated_at', |
|
10 | + protected $fillable = ['id', 'name', 'created_at', 'updated_at', |
|
11 | 11 | |
12 | 12 | ]; |
13 | 13 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | class ContractType extends Model |
10 | 10 | { |
11 | 11 | protected $table = 'sd_contract_types'; |
12 | - protected $fillable = ['id','name','created_at','updated_at', |
|
12 | + protected $fillable = ['id', 'name', 'created_at', 'updated_at', |
|
13 | 13 | |
14 | 14 | ]; |
15 | 15 |