@@ -56,12 +56,12 @@ discard block |
||
56 | 56 | if ($input->hasFile($fieldKey)) { |
57 | 57 | $avatar = $input->file($fieldKey); |
58 | 58 | $random = str_random(8); |
59 | - $filename = time().'_'.$random.'.'.$avatar->getClientOriginalExtension(); |
|
59 | + $filename = time() . '_' . $random . '.' . $avatar->getClientOriginalExtension(); |
|
60 | 60 | if (!file_exists(public_path('/files/uploads/'))) { |
61 | 61 | mkdir(public_path('/files/uploads/'), 0777, true); |
62 | 62 | } |
63 | 63 | $avatar->move(public_path('/files/uploads/'), $filename); |
64 | - $filepath = '/files/uploads/'.$filename; |
|
64 | + $filepath = '/files/uploads/' . $filename; |
|
65 | 65 | } else { |
66 | 66 | $filepath = null; |
67 | 67 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | if (count($findThis) > 0) { |
119 | 119 | foreach ($findThis as $founded) { |
120 | 120 | if (strpos($founded, $input->get('_form_slug')) !== false) { |
121 | - $sendValue = str_replace('['.$founded.']', $input->get($founded), $sendValue); |
|
121 | + $sendValue = str_replace('[' . $founded . ']', $input->get($founded), $sendValue); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | $inputData = $sendValue; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | public function __construct(array $attributes = []) |
31 | 31 | { |
32 | 32 | //parent::construct( $attributes ); |
33 | - $this->table = config('menu.table_prefix').config('menu.table_name_items'); |
|
33 | + $this->table = config('menu.table_prefix') . config('menu.table_name_items'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getsons($id) |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | $templates = $this->where('active', 1)->where('type', 'default')->get(); |
34 | 34 | $emailTemplates = []; |
35 | 35 | foreach ($templates as $template) { |
36 | - if (file_exists(base_path('vendor/'.$template->path.'/src/views/templates/'.$template->slug.'/mails'))) { |
|
37 | - $mailDir = array_slice(scandir(base_path('vendor/'.$template->path.'/src/views/templates/'.$template->slug.'/mails')), 2); |
|
36 | + if (file_exists(base_path('vendor/' . $template->path . '/src/views/templates/' . $template->slug . '/mails'))) { |
|
37 | + $mailDir = array_slice(scandir(base_path('vendor/' . $template->path . '/src/views/templates/' . $template->slug . '/mails')), 2); |
|
38 | 38 | if (count($mailDir) > 0) { |
39 | 39 | $emailTemplates[$template->slug]['hintpath'] = $template->hintpath; |
40 | 40 | foreach ($mailDir as $mdKey => $mdValue) { |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
47 | - if (file_exists(base_path('resources/views/vendor/'.$template->slug.'/templates/'.$template->slug.'/mails'))) { |
|
48 | - $mailDirVendor = array_slice(scandir(base_path('resources/views/vendor/'.$template->slug.'/templates/'.$template->slug.'/mails')), 2); |
|
47 | + if (file_exists(base_path('resources/views/vendor/' . $template->slug . '/templates/' . $template->slug . '/mails'))) { |
|
48 | + $mailDirVendor = array_slice(scandir(base_path('resources/views/vendor/' . $template->slug . '/templates/' . $template->slug . '/mails')), 2); |
|
49 | 49 | if (count($mailDirVendor) > 0) { |
50 | 50 | $emailTemplates[$template->slug]['hintpath'] = $template->hintpath; |
51 | 51 | foreach ($mailDirVendor as $mdKey => $mdValue) { |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | $templates = $this->where('active', 1)->get(); |
66 | 66 | $pageViews = []; |
67 | 67 | foreach ($templates as $template) { |
68 | - if (file_exists(base_path('packages/'.$template->path.'/src/views/templates/'.$template->slug))) { |
|
69 | - $pageDir = array_slice(scandir(base_path('packages/'.$template->path.'/src/views/templates/'.$template->slug)), 2); |
|
68 | + if (file_exists(base_path('packages/' . $template->path . '/src/views/templates/' . $template->slug))) { |
|
69 | + $pageDir = array_slice(scandir(base_path('packages/' . $template->path . '/src/views/templates/' . $template->slug)), 2); |
|
70 | 70 | if (count($pageDir) > 0) { |
71 | 71 | $pageViews[$template->slug]['hintpath'] = $template->hintpath; |
72 | 72 | foreach ($pageDir as $pdKey => $pdValue) { |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | } |
79 | - if (file_exists(base_path('vendor/'.$template->path.'/src/views/templates/'.$template->slug))) { |
|
80 | - $pageDir = array_slice(scandir(base_path('vendor/'.$template->path.'/src/views/templates/'.$template->slug)), 2); |
|
79 | + if (file_exists(base_path('vendor/' . $template->path . '/src/views/templates/' . $template->slug))) { |
|
80 | + $pageDir = array_slice(scandir(base_path('vendor/' . $template->path . '/src/views/templates/' . $template->slug)), 2); |
|
81 | 81 | if (count($pageDir) > 0) { |
82 | 82 | $pageViews[$template->slug]['hintpath'] = $template->hintpath; |
83 | 83 | foreach ($pageDir as $pdKey => $pdValue) { |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |
90 | - if (file_exists(base_path('resources/views/vendor/'.$template->slug.'/templates/'.$template->slug))) { |
|
91 | - $pageDir = array_slice(scandir(base_path('resources/views/vendor/'.$template->slug.'/templates/'.$template->slug)), 2); |
|
90 | + if (file_exists(base_path('resources/views/vendor/' . $template->slug . '/templates/' . $template->slug))) { |
|
91 | + $pageDir = array_slice(scandir(base_path('resources/views/vendor/' . $template->slug . '/templates/' . $template->slug)), 2); |
|
92 | 92 | if (count($pageDir) > 0) { |
93 | 93 | $pageViews[$template->slug]['hintpath'] = $template->hintpath; |
94 | 94 | foreach ($pageDir as $pdKey => $pdValue) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function register() |
29 | 29 | { |
30 | - $this->app->singleton('ChuckSite', function () { |
|
30 | + $this->app->singleton('ChuckSite', function() { |
|
31 | 31 | $site = Site::first(); |
32 | 32 | if ($site == null) { |
33 | 33 | throw new Exception('Whoops! No Site Defined...'); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function register() |
26 | 26 | { |
27 | - $this->app->bind('ChuckTemplate', function () { |
|
27 | + $this->app->bind('ChuckTemplate', function() { |
|
28 | 28 | $template = TemplateModel::first(); |
29 | 29 | if ($template == null) { |
30 | 30 | throw new Exception('Whoops! No Template Defined...'); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register() |
27 | 27 | { |
28 | - $this->app->bind('ChuckRepeater', function () { |
|
28 | + $this->app->bind('ChuckRepeater', function() { |
|
29 | 29 | return new \Chuckbe\Chuckcms\Chuck\Accessors\Repeater(\App::make(Repeater::class), \App::make(RepeaterRepository::class)); |
30 | 30 | }); |
31 | 31 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function register() |
25 | 25 | { |
26 | - $this->app->bind('ChuckMenu', function () { |
|
26 | + $this->app->bind('ChuckMenu', function() { |
|
27 | 27 | return new \Chuckbe\Chuckcms\Chuck\Accessors\Menu(); |
28 | 28 | }); |
29 | 29 | } |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | |
66 | 66 | $repeater = $this->repeater->where('url', $slug)->first(); |
67 | 67 | if ($repeater !== null) { |
68 | - $templateHintpath = explode('::', (string) $repeater->page)[0]; |
|
68 | + $templateHintpath = explode('::', (string)$repeater->page)[0]; |
|
69 | 69 | $template = $this->template->where('active', 1)->where('hintpath', $templateHintpath)->first(); |
70 | 70 | |
71 | - return view((string) $repeater->page, compact('template', 'repeater')); |
|
71 | + return view((string)$repeater->page, compact('template', 'repeater')); |
|
72 | 72 | } |
73 | 73 | |
74 | - $page = $this->page->where('slug->'.app()->getLocale(), $slug)->first(); |
|
74 | + $page = $this->page->where('slug->' . app()->getLocale(), $slug)->first(); |
|
75 | 75 | if ($page == null) { |
76 | 76 | foreach (\LaravelLocalization::getSupportedLocales() as $localeCode => $properties) { |
77 | - $page = $this->page->where('slug->'.$localeCode, $slug)->first(); |
|
77 | + $page = $this->page->where('slug->' . $localeCode, $slug)->first(); |
|
78 | 78 | if ($page !== null && $localeCode == app()->getLocale()) { |
79 | 79 | break; |
80 | 80 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | app()->setLocale($localeCode); |
85 | 85 | \LaravelLocalization::setLocale($localeCode); |
86 | 86 | |
87 | - return redirect($localeCode.'/'.$slug); |
|
87 | + return redirect($localeCode . '/' . $slug); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -127,6 +127,6 @@ discard block |
||
127 | 127 | |
128 | 128 | $template = $this->template->where('active', 1)->where('id', $page->template_id)->first(); |
129 | 129 | |
130 | - return view($template->hintpath.'::templates.'.$template->slug.'.page', compact('template', 'page', 'pageblocks')); |
|
130 | + return view($template->hintpath . '::templates.' . $template->slug . '.page', compact('template', 'page', 'pageblocks')); |
|
131 | 131 | } |
132 | 132 | } |
@@ -104,7 +104,7 @@ |
||
104 | 104 | { |
105 | 105 | $menuitem = new MenuItems(); |
106 | 106 | $menuitem->label = request()->input('labelmenu'); |
107 | - $menuitem->link = 'page:'.request()->input('linkmenu'); |
|
107 | + $menuitem->link = 'page:' . request()->input('linkmenu'); |
|
108 | 108 | $menuitem->menu = request()->input('idmenu'); |
109 | 109 | $menuitem->sort = MenuItems::getNextSortRoot(request()->input('idmenu')); |
110 | 110 | $menuitem->save(); |