@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->cbLoader(); |
24 | 24 | $selectedIds = request('checkbox'); |
25 | 25 | $btnName = request('button_name'); |
26 | - if (! $selectedIds) { |
|
26 | + if (!$selectedIds) { |
|
27 | 27 | CB::redirect($_SERVER['HTTP_REFERER'], 'Please select at least one row!', 'warning'); |
28 | 28 | } |
29 | 29 | if ($btnName == 'delete') { |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | $message = cbTrans('alert_action', ['action' => $action]); |
48 | 48 | |
49 | 49 | if ($this->actionButtonSelected($id_selected, $button_name) === false) { |
50 | - $message = ! empty($this->alert['message']) ? $this->alert['message'] : 'Error'; |
|
51 | - $type = ! empty($this->alert['type']) ? $this->alert['type'] : 'danger'; |
|
50 | + $message = !empty($this->alert['message']) ? $this->alert['message'] : 'Error'; |
|
51 | + $type = !empty($this->alert['type']) ? $this->alert['type'] : 'danger'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | backWithMsg($message, $type); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | class FontAwesome |
6 | 6 | { |
7 | - public static function cssClass(){ |
|
7 | + public static function cssClass() { |
|
8 | 8 | return [ |
9 | 9 | 'glass', |
10 | 10 | 'music', |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function xls($filename, $response, $orientation) |
32 | 32 | { |
33 | - return Excel::create($filename, function ($excel) use ($response, $orientation) { |
|
33 | + return Excel::create($filename, function($excel) use ($response, $orientation) { |
|
34 | 34 | $excel->setTitle($filename)->setCreator("crudbooster.com")->setCompany(cbGetsetting('appname')); |
35 | - $excel->sheet($filename, function ($sheet) use ($response, $orientation) { |
|
35 | + $excel->sheet($filename, function($sheet) use ($response, $orientation) { |
|
36 | 36 | $sheet->setOrientation($orientation); |
37 | 37 | $sheet->loadview('crudbooster::export', $response); |
38 | 38 | }); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function csv($filename, $response, $orientation) |
48 | 48 | { |
49 | - return Excel::create($filename, function ($excel) use ($response, $orientation) { |
|
49 | + return Excel::create($filename, function($excel) use ($response, $orientation) { |
|
50 | 50 | $excel->setTitle($filename)->setCreator("crudbooster.com")->setCompany(cbGetsetting('appname')); |
51 | - $excel->sheet($filename, function ($sheet) use ($response, $orientation) { |
|
51 | + $excel->sheet($filename, function($sheet) use ($response, $orientation) { |
|
52 | 52 | $sheet->setOrientation($orientation); |
53 | 53 | $sheet->loadview('crudbooster::export', $response); |
54 | 54 | }); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | function uploadImportData($file) |
51 | 51 | { |
52 | 52 | $dir = 'uploads/'.date('Y-m'); |
53 | - $filename = md5(str_random(5)).'.'. $file->getClientOriginalExtension(); |
|
53 | + $filename = md5(str_random(5)).'.'.$file->getClientOriginalExtension(); |
|
54 | 54 | |
55 | 55 | //Create Directory Monthly |
56 | 56 | Storage::makeDirectory($dir); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function validateForImport($file) |
69 | 69 | { |
70 | - return Validator::make(['extension' => $file->getClientOriginalExtension(),], ['extension' => 'in:xls,xlsx,csv']); |
|
70 | + return Validator::make(['extension' => $file->getClientOriginalExtension(), ], ['extension' => 'in:xls,xlsx,csv']); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | $file = base64_decode(request('file')); |
85 | 85 | $file = 'storage'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.$file; |
86 | - $rows = Excel::load($file, function ($reader) { |
|
86 | + $rows = Excel::load($file, function($reader) { |
|
87 | 87 | })->get(); |
88 | 88 | |
89 | 89 | //$data_import_column = []; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | foreach ($select_column as $sk => $s) { |
93 | 93 | $colname = $table_columns[$sk]; |
94 | 94 | |
95 | - if (! CRUDBooster::isForeignKey($colname) || intval($value->$s)) { |
|
95 | + if (!CRUDBooster::isForeignKey($colname) || intval($value->$s)) { |
|
96 | 96 | $a[$colname] = $value->$s; |
97 | 97 | continue; |
98 | 98 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $relation_moduls = DB::table('cms_moduls')->where('table_name', $relation_table)->first(); |
107 | 107 | |
108 | 108 | $relation_class = __NAMESPACE__.'\\'.$relation_moduls->controller; |
109 | - if (! class_exists($relation_class)) { |
|
109 | + if (!class_exists($relation_class)) { |
|
110 | 110 | $relation_class = '\App\Http\Controllers\\'.$relation_moduls->controller; |
111 | 111 | } |
112 | 112 | $relation_class = new $relation_class; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | private function guardView($request) |
61 | 61 | { |
62 | - if ($request->is($this->url.'*') && ! CRUDBooster::canView()) { |
|
62 | + if ($request->is($this->url.'*') && !CRUDBooster::canView()) { |
|
63 | 63 | $this->stopIllegalAction('view'); |
64 | 64 | } |
65 | 65 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | private function guardCreate($request) |
71 | 71 | { |
72 | - if ($request->is($this->url.'/add*') && ! CRUDBooster::canCreate()) { |
|
72 | + if ($request->is($this->url.'/add*') && !CRUDBooster::canCreate()) { |
|
73 | 73 | $this->stopIllegalAction('add'); |
74 | 74 | } |
75 | 75 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function guardUpdate($request) |
81 | 81 | { |
82 | - if ($request->is($this->url.'/edit*') && ! CRUDBooster::canUpdate()) { |
|
82 | + if ($request->is($this->url.'/edit*') && !CRUDBooster::canUpdate()) { |
|
83 | 83 | $this->stopIllegalAction('edit'); |
84 | 84 | } |
85 | 85 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | private function guardDelete($request) |
91 | 91 | { |
92 | - if ($request->is($this->url.'/delete*') && ! CRUDBooster::canDelete()) { |
|
92 | + if ($request->is($this->url.'/delete*') && !CRUDBooster::canDelete()) { |
|
93 | 93 | $this->stopIllegalAction('delete'); |
94 | 94 | } |
95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | private function guardRead($request) |
101 | 101 | { |
102 | - if ($request->is($this->url.'/detail*') && ! CRUDBooster::canRead()) { |
|
102 | + if ($request->is($this->url.'/detail*') && !CRUDBooster::canRead()) { |
|
103 | 103 | $this->stopIllegalAction('view'); |
104 | 104 | } |
105 | 105 | } |
@@ -116,7 +116,7 @@ |
||
116 | 116 | */ |
117 | 117 | private function tokenMissMatchDevice($senderToken, $userAgent, $serverToken) |
118 | 118 | { |
119 | - if (! Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) { |
|
119 | + if (!Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) { |
|
120 | 120 | return; |
121 | 121 | } |
122 | 122 | $result = []; |
@@ -19,16 +19,16 @@ |
||
19 | 19 | { |
20 | 20 | $adminPath = cbConfig('ADMIN_PATH', 'admin'); |
21 | 21 | |
22 | - if(CRUDBooster::myId()==''){ |
|
22 | + if (CRUDBooster::myId() == '') { |
|
23 | 23 | $url = url($adminPath.'/login'); |
24 | 24 | return redirect($url)->with('message', cbTrans('not_logged_in')); |
25 | 25 | } |
26 | 26 | |
27 | - if(!CRUDBooster::isSuperadmin()) { |
|
28 | - return redirect($adminPath)->with(['message'=> cbTrans('denied_access'),'message_type'=>'warning']); |
|
27 | + if (!CRUDBooster::isSuperadmin()) { |
|
28 | + return redirect($adminPath)->with(['message'=> cbTrans('denied_access'), 'message_type'=>'warning']); |
|
29 | 29 | } |
30 | 30 | |
31 | - if(CRUDBooster::isLocked()){ |
|
31 | + if (CRUDBooster::isLocked()) { |
|
32 | 32 | return redirect(url($adminPath.'/lock-screen')); |
33 | 33 | } |
34 | 34 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | public function send($regID, $data) |
12 | 12 | { |
13 | - if (! $data['title'] || ! $data['content']) { |
|
13 | + if (!$data['title'] || !$data['content']) { |
|
14 | 14 | return 'title , content null !'; |
15 | 15 | } |
16 | 16 |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | private function sendMail($html, $subject, $template) |
78 | 78 | { |
79 | - \Mail::send("crudbooster::emails.blank", ['content' => $html], function ($message) use ($subject, $template) { |
|
79 | + \Mail::send("crudbooster::emails.blank", ['content' => $html], function($message) use ($subject, $template) { |
|
80 | 80 | $message->priority(1); |
81 | 81 | $message->to($this->reciever); |
82 | 82 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $attachments = unserialize($queue->email_attachments); |
107 | 107 | |
108 | - \Mail::send("crudbooster::emails.blank", ['content' => $queue->email_content], function ($message) use ( |
|
108 | + \Mail::send("crudbooster::emails.blank", ['content' => $queue->email_content], function($message) use ( |
|
109 | 109 | $queue, |
110 | 110 | $attachments |
111 | 111 | ) { |