@@ -71,7 +71,9 @@ |
||
71 | 71 | $user = []; |
72 | 72 | $user['name'] = request('name'); |
73 | 73 | $user['email'] = request('email'); |
74 | - if(request('password')) $user['password'] = Hash::make(request('password')); |
|
74 | + if(request('password')) { |
|
75 | + $user['password'] = Hash::make(request('password')); |
|
76 | + } |
|
75 | 77 | $user['cb_roles_id'] = request('cb_roles_id'); |
76 | 78 | DB::table('users')->where('id',$id)->update($user); |
77 | 79 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | if($column->getFormat()) { |
24 | 24 | return date($column->getFormat(), strtotime($row->{$column->getField()})); |
25 | - }else{ |
|
25 | + } else{ |
|
26 | 26 | return $row->{$column->getField()}; |
27 | 27 | } |
28 | 28 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $data = DB::table($table); |
37 | 37 | if($SQLCondition && is_callable($SQLCondition)) { |
38 | 38 | $data = call_user_func($SQLCondition, $data); |
39 | - }elseif ($SQLCondition && is_string($SQLCondition)) { |
|
39 | + } elseif ($SQLCondition && is_string($SQLCondition)) { |
|
40 | 40 | $data->whereRaw($SQLCondition); |
41 | 41 | } |
42 | 42 | $data = $data->get(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $data = DB::table($table); |
37 | 37 | if($SQLCondition && is_callable($SQLCondition)) { |
38 | 38 | $data = call_user_func($SQLCondition, $data); |
39 | - }elseif ($SQLCondition && is_string($SQLCondition)) { |
|
39 | + } elseif ($SQLCondition && is_string($SQLCondition)) { |
|
40 | 40 | $data->whereRaw($SQLCondition); |
41 | 41 | } |
42 | 42 | $data = $data->get(); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | if($column->getFormat()) { |
24 | 24 | return date($column->getFormat(), strtotime($row->{$column->getField()})); |
25 | - }else{ |
|
25 | + } else{ |
|
26 | 26 | return $row->{$column->getField()}; |
27 | 27 | } |
28 | 28 | } |
@@ -28,8 +28,11 @@ |
||
28 | 28 | { |
29 | 29 | $user = $this->user(); |
30 | 30 | $role = cb()->find("cb_roles", $user->cb_roles_id); |
31 | - if($role) return $role->name; |
|
32 | - else return null; |
|
31 | + if($role) { |
|
32 | + return $role->name; |
|
33 | + } else { |
|
34 | + return null; |
|
35 | + } |
|
33 | 36 | } |
34 | 37 | |
35 | 38 | public function roleId() |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** @var ColumnModel $column */ |
50 | 50 | if($data_row) { |
51 | 51 | $value = (isset($data_row->{$column->getField()}))?$data_row->{ $column->getField() }:null; |
52 | - }else{ |
|
52 | + } else{ |
|
53 | 53 | $value = request($column->getName()); |
54 | 54 | |
55 | 55 | if(!$value && $column->getDefaultValue()) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | foreach($column->getValue() as $key=>$val) { |
140 | 140 | $data[$key] = $val; |
141 | 141 | } |
142 | - }else{ |
|
142 | + } else{ |
|
143 | 143 | $data[$column->getField()] = $column->getValue(); |
144 | 144 | } |
145 | 145 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->info("== Generating Seeder =="); |
37 | 37 | $this->generateSeeder(); |
38 | 38 | $this->info("== Finish =="); |
39 | - }else{ |
|
39 | + } else{ |
|
40 | 40 | $this->info("== Importing the seeder =="); |
41 | 41 | $this->call("db:seed",["--class"=>"CbMigrationSeeder"]); |
42 | 42 | $this->info("== Finish =="); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $composer_path = ''; |
92 | 92 | if (file_exists(getcwd().'/composer.phar')) { |
93 | 93 | $composer_path = '"'.PHP_BINARY.'" '.getcwd().'/composer.phar'; |
94 | - }else{ |
|
94 | + } else{ |
|
95 | 95 | $composer_path = 'composer'; |
96 | 96 | } |
97 | 97 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | foreach($tables as $table) { |
38 | 38 | $this->generate($table); |
39 | 39 | } |
40 | - }else{ |
|
40 | + } else{ |
|
41 | 41 | $this->generate($option); |
42 | 42 | } |
43 | 43 | } |