@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | - if (! Storage::exists($fullFilePath)) { |
|
39 | + if (!Storage::exists($fullFilePath)) { |
|
40 | 40 | abort(404); |
41 | 41 | } |
42 | 42 | |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | $h = Request::get('h') ?: $w; |
58 | 58 | } |
59 | 59 | |
60 | - $imgRaw = Image::cache(function ($image) use ($fullStoragePath, $w, $h) { |
|
60 | + $imgRaw = Image::cache(function($image) use ($fullStoragePath, $w, $h) { |
|
61 | 61 | $im = $image->make($fullStoragePath); |
62 | 62 | if ($w) { |
63 | - if (! $h) { |
|
63 | + if (!$h) { |
|
64 | 64 | $im->fit($w); |
65 | 65 | } else { |
66 | 66 | $im->fit($w, $h); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function getLockscreen() |
20 | 20 | { |
21 | 21 | |
22 | - if (! CRUDBooster::myId()) { |
|
22 | + if (!CRUDBooster::myId()) { |
|
23 | 23 | Session::flush(); |
24 | 24 | |
25 | 25 | return redirect()->route('getLogin')->with('message', trans('crudbooster.alert_session_expired')); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $this->cbLoader(); |
48 | 48 | |
49 | - if (! CRUDBooster::isCreate() && $this->global_privilege == false) { |
|
49 | + if (!CRUDBooster::isCreate() && $this->global_privilege == false) { |
|
50 | 50 | CRUDBooster::insertLog(trans('crudbooster.log_try_add', ['module' => CRUDBooster::getCurrentModule()->name])); |
51 | 51 | CRUDBooster::redirect(CRUDBooster::adminPath(), trans("crudbooster.denied_access")); |
52 | 52 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $this->cbLoader(); |
65 | 65 | |
66 | - if (! CRUDBooster::isCreate() && $this->global_privilege == false) { |
|
66 | + if (!CRUDBooster::isCreate() && $this->global_privilege == false) { |
|
67 | 67 | CRUDBooster::insertLog(trans('crudbooster.log_try_add_save', [ |
68 | 68 | 'name' => Request::input($this->title_field), |
69 | 69 | 'module' => CRUDBooster::getCurrentModule()->name, |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $row = DB::table($this->table)->where("id", $id)->first(); |
115 | 115 | |
116 | - if (! CRUDBooster::isRead() && $this->global_privilege == false) { |
|
116 | + if (!CRUDBooster::isRead() && $this->global_privilege == false) { |
|
117 | 117 | CRUDBooster::insertLog(trans("crudbooster.log_try_edit", [ |
118 | 118 | 'name' => $row->{$this->title_field}, |
119 | 119 | 'module' => CRUDBooster::getCurrentModule()->name, |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | $row = CRUDBooster::first($this->table, $id); |
137 | 137 | |
138 | - if (! CRUDBooster::isUpdate() && $this->global_privilege == false) { |
|
138 | + if (!CRUDBooster::isUpdate() && $this->global_privilege == false) { |
|
139 | 139 | CRUDBooster::insertLog(trans("crudbooster.log_try_add", ['name' => $row->{$this->title_field}, 'module' => CRUDBooster::getCurrentModule()->name])); |
140 | 140 | CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access')); |
141 | 141 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | $row = DB::table($this->table)->where($this->primary_key, $id)->first(); |
202 | 202 | |
203 | - if (! CRUDBooster::isDelete() && $this->global_privilege == false) { |
|
203 | + if (!CRUDBooster::isDelete() && $this->global_privilege == false) { |
|
204 | 204 | CRUDBooster::insertLog(trans("crudbooster.log_try_delete", [ |
205 | 205 | 'name' => $row->{$this->title_field}, |
206 | 206 | 'module' => CRUDBooster::getCurrentModule()->name, |
@@ -20,21 +20,21 @@ discard block |
||
20 | 20 | |
21 | 21 | # START COLUMNS DO NOT REMOVE THIS LINE |
22 | 22 | $this->col = array(); |
23 | - $this->col[] = array("label"=>"Name","name"=>"name"); |
|
24 | - $this->col[] = array("label"=>"Email","name"=>"email"); |
|
25 | - $this->col[] = array("label"=>"Privilege","name"=>"id_cms_privileges","join"=>"cms_privileges,name"); |
|
26 | - $this->col[] = array("label"=>"Photo","name"=>"photo","image"=>1); |
|
23 | + $this->col[] = array("label"=>"Name", "name"=>"name"); |
|
24 | + $this->col[] = array("label"=>"Email", "name"=>"email"); |
|
25 | + $this->col[] = array("label"=>"Privilege", "name"=>"id_cms_privileges", "join"=>"cms_privileges,name"); |
|
26 | + $this->col[] = array("label"=>"Photo", "name"=>"photo", "image"=>1); |
|
27 | 27 | # END COLUMNS DO NOT REMOVE THIS LINE |
28 | 28 | |
29 | 29 | # START FORM DO NOT REMOVE THIS LINE |
30 | 30 | $this->form = array(); |
31 | - $this->form[] = array("label"=>"Name","name"=>"name",'required'=>true,'validation'=>'required|alpha_spaces|min:3'); |
|
32 | - $this->form[] = array("label"=>"Email","name"=>"email",'required'=>true,'type'=>'email','validation'=>'required|email|unique:cms_users,email,'.CRUDBooster::getCurrentId()); |
|
33 | - $this->form[] = array("label"=>"Photo","name"=>"photo","type"=>"upload","help"=>"Recommended resolution is 200x200px",'required'=>true,'validation'=>'required|image|max:1000','resize_width'=>90,'resize_height'=>90); |
|
34 | - $this->form[] = array("label"=>"Privilege","name"=>"id_cms_privileges","type"=>"select","datatable"=>"cms_privileges,name",'required'=>true); |
|
31 | + $this->form[] = array("label"=>"Name", "name"=>"name", 'required'=>true, 'validation'=>'required|alpha_spaces|min:3'); |
|
32 | + $this->form[] = array("label"=>"Email", "name"=>"email", 'required'=>true, 'type'=>'email', 'validation'=>'required|email|unique:cms_users,email,'.CRUDBooster::getCurrentId()); |
|
33 | + $this->form[] = array("label"=>"Photo", "name"=>"photo", "type"=>"upload", "help"=>"Recommended resolution is 200x200px", 'required'=>true, 'validation'=>'required|image|max:1000', 'resize_width'=>90, 'resize_height'=>90); |
|
34 | + $this->form[] = array("label"=>"Privilege", "name"=>"id_cms_privileges", "type"=>"select", "datatable"=>"cms_privileges,name", 'required'=>true); |
|
35 | 35 | // $this->form[] = array("label"=>"Password","name"=>"password","type"=>"password","help"=>"Please leave empty if not change"); |
36 | - $this->form[] = array("label"=>"Password","name"=>"password","type"=>"password","help"=>"Please leave empty if not change"); |
|
37 | - $this->form[] = array("label"=>"Password Confirmation","name"=>"password_confirmation","type"=>"password","help"=>"Please leave empty if not change"); |
|
36 | + $this->form[] = array("label"=>"Password", "name"=>"password", "type"=>"password", "help"=>"Please leave empty if not change"); |
|
37 | + $this->form[] = array("label"=>"Password Confirmation", "name"=>"password_confirmation", "type"=>"password", "help"=>"Please leave empty if not change"); |
|
38 | 38 | # END FORM DO NOT REMOVE THIS LINE |
39 | 39 | |
40 | 40 | } |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | $this->hide_form = ['id_cms_privileges']; |
50 | 50 | |
51 | 51 | $data['page_title'] = trans("crudbooster.label_button_profile"); |
52 | - $data['row'] = CRUDBooster::first('cms_users',CRUDBooster::myId()); |
|
53 | - $this->cbView('crudbooster::default.form',$data); |
|
52 | + $data['row'] = CRUDBooster::first('cms_users', CRUDBooster::myId()); |
|
53 | + $this->cbView('crudbooster::default.form', $data); |
|
54 | 54 | } |
55 | - public function hook_before_edit(&$postdata,$id) { |
|
55 | + public function hook_before_edit(&$postdata, $id) { |
|
56 | 56 | unset($postdata['password_confirmation']); |
57 | 57 | } |
58 | 58 | public function hook_before_add(&$postdata) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | </form> |
43 | 43 | @elseif($command=='showFunction') |
44 | 44 | <?php |
45 | - if($key == 'value') { |
|
45 | + if ($key == 'value') { |
|
46 | 46 | if ($config->type == 'controller') { |
47 | 47 | $url = action($value); |
48 | 48 | } elseif ($config->type == 'route') { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | </script> |
62 | 62 | |
63 | 63 | <?php |
64 | - }else { |
|
64 | + } else { |
|
65 | 65 | echo $value; |
66 | 66 | } |
67 | 67 | ?> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | </form> |
39 | 39 | @elseif($command=='showFunction') |
40 | 40 | <?php |
41 | - if($key == 'sql') { |
|
41 | + if ($key == 'sql') { |
|
42 | 42 | try { |
43 | 43 | $sessions = Session::all(); |
44 | 44 | foreach ($sessions as $key => $val) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | </script> |
78 | 78 | @endif |
79 | 79 | <?php |
80 | - }else { |
|
80 | + } else { |
|
81 | 81 | echo $value; |
82 | 82 | } |
83 | 83 | ?> |
@@ -151,7 +151,7 @@ |
||
151 | 151 | |
152 | 152 | <tr> |
153 | 153 | @foreach($table_columns as $k=>$column) |
154 | - <?php if ($column == 'id' || $column == 'created_at' || $column == 'updated_at' || $column == 'deleted_at') continue;?> |
|
154 | + <?php if ($column == 'id' || $column == 'created_at' || $column == 'updated_at' || $column == 'deleted_at') continue; ?> |
|
155 | 155 | <td data-no-column='{{$k}}'> |
156 | 156 | <select style='width:120px' class='form-control select_column' name='select_column[{{$k}}]'> |
157 | 157 | <option value=''>** Set Column for {{$column}}</option> |
@@ -83,16 +83,16 @@ discard block |
||
83 | 83 | </tr> |
84 | 84 | </thead> |
85 | 85 | <tbody> |
86 | - <?php $no = 0;?> |
|
86 | + <?php $no = 0; ?> |
|
87 | 87 | @foreach($apis as $api) |
88 | 88 | <?php |
89 | 89 | $parameters = ($api->parameters) ? unserialize($api->parameters) : array(); |
90 | 90 | $responses = ($api->responses) ? unserialize($api->responses) : array(); |
91 | 91 | ?> |
92 | 92 | <tr> |
93 | - <td><?= ++$no;?></td> |
|
93 | + <td><?= ++$no; ?></td> |
|
94 | 94 | <td> |
95 | - <a href='javascript:void(0)' title='API {{$ac->nama}}' style='color:#009fe3' class='link_name_api'><?=$api->nama;?></a> |
|
95 | + <a href='javascript:void(0)' title='API {{$ac->nama}}' style='color:#009fe3' class='link_name_api'><?=$api->nama; ?></a> |
|
96 | 96 | <sup> |
97 | 97 | <a title='Delete this API' onclick="deleteApi({{$api->id}})" href="javascript:void(0)"><i class='fa fa-trash'></i></a> |
98 | 98 | <a title='Edit This API' href="{{url(config('crudbooster.ADMIN_PATH').'/api_generator/edit-api').'/'.$api->id}}"><i |
@@ -124,12 +124,12 @@ discard block |
||
124 | 124 | </tr> |
125 | 125 | </thead> |
126 | 126 | <tbody> |
127 | - <?php $i = 0;?> |
|
127 | + <?php $i = 0; ?> |
|
128 | 128 | @foreach($parameters as $param) |
129 | 129 | @if($param['used']) |
130 | 130 | <?php |
131 | 131 | $param_exception = ['in', 'not_in', 'digits_between']; |
132 | - if ($param['config'] && substr($param['config'], 0, 1) != '*' && ! in_array($param['type'], $param_exception)) continue;?> |
|
132 | + if ($param['config'] && substr($param['config'], 0, 1) != '*' && !in_array($param['type'], $param_exception)) continue; ?> |
|
133 | 133 | <tr> |
134 | 134 | <td>{{++$i}}</td> |
135 | 135 | <td width="5%"><em>{{$param['type']}}</em></td> |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | </tr> |
169 | 169 | </thead> |
170 | 170 | <tbody> |
171 | - <?php $i = 1;?> |
|
171 | + <?php $i = 1; ?> |
|
172 | 172 | <tr> |
173 | 173 | <td>{{$i++}}</td> |
174 | 174 | <td><em>integer</em></td> |
@@ -19,7 +19,7 @@ |
||
19 | 19 | <input type="text" class="form-control input-label {{$required?"required":""}}" {{$required?"required":""}} value="{{$datamodal_value}}" readonly> |
20 | 20 | <span class="input-group-btn"> |
21 | 21 | <button class="btn btn-primary" onclick="showModal{{$name}}()" type="button"><i class='fa fa-search'></i> {{trans('crudbooster.datamodal_browse_data')}}</button> |
22 | - <?php if(strlen($form['datamodal_module_path']) > 1){ ?> |
|
22 | + <?php if (strlen($form['datamodal_module_path']) > 1) { ?> |
|
23 | 23 | <a class="btn btn-info" href="{{CRUDBooster::adminPath()}}/{{$form['datamodal_module_path']}}" target="_blank"><i |
24 | 24 | class='fa fa-edit'></i> {{$form['label']}}</a> |
25 | 25 | <?php } ?> |