@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | protected function getCrop($crop_params) |
97 | 97 | { |
98 | 98 | if (!empty($crop_params)) { |
99 | - return ['rect' => $crop_params['crop_x'].','.$crop_params['crop_y'].','.$crop_params['crop_w'].','.$crop_params['crop_h']]; |
|
99 | + return ['rect' => $crop_params['crop_x'] . ',' . $crop_params['crop_y'] . ',' . $crop_params['crop_w'] . ',' . $crop_params['crop_h']]; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return []; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $params = ['fp-x' => $fpX, 'fp-y' => $fpY, 'fp-z' => $fpZ]; |
120 | 120 | |
121 | - return array_map(function ($param) { |
|
121 | + return array_map(function($param) { |
|
122 | 122 | return number_format($param, 4, '.', ''); |
123 | 123 | }, $params) + ['crop' => 'focalpoint', 'fit' => 'crop']; |
124 | 124 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | public function getRawUrl($id) |
40 | 40 | { |
41 | - return '/'.$id; |
|
41 | + return '/' . $id; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | public function getDimensions($id) |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | $policyJson = json_encode($policyObject); |
17 | 17 | $policyHeaders = $policyObject['headers'] ?? null; |
18 | 18 | |
19 | - $this->bucket = config('filesystems.disks.'.$disk.'.bucket'); |
|
20 | - $this->secret = config('filesystems.disks.'.$disk.'.secret'); |
|
19 | + $this->bucket = config('filesystems.disks.' . $disk . '.bucket'); |
|
20 | + $this->secret = config('filesystems.disks.' . $disk . '.secret'); |
|
21 | 21 | $this->endpoint = s3Endpoint($disk); |
22 | 22 | |
23 | 23 | if ($policyHeaders) { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $pattern = "/.+\/(.+)\\/(.+)\/s3\/aws4_request/"; |
79 | 79 | preg_match($pattern, $credentialCondition, $matches); |
80 | 80 | |
81 | - $dateKey = hash_hmac('sha256', $matches[1], 'AWS4'.$this->secret, true); |
|
81 | + $dateKey = hash_hmac('sha256', $matches[1], 'AWS4' . $this->secret, true); |
|
82 | 82 | $dateRegionKey = hash_hmac('sha256', $matches[2], $dateKey, true); |
83 | 83 | $dateRegionServiceKey = hash_hmac('sha256', 's3', $dateRegionKey, true); |
84 | 84 | $signingKey = hash_hmac('sha256', 'aws4_request', $dateRegionServiceKey, true); |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | $pattern = "/.+\\n.+\\n(\\d+)\/(.+)\/s3\/aws4_request\\n(.+)/s"; |
109 | 109 | preg_match($pattern, $policyHeaders, $matches); |
110 | 110 | $hashedCanonicalRequest = hash('sha256', $matches[3]); |
111 | - $stringToSign = preg_replace("/^(.+)\/s3\/aws4_request\\n.+$/s", '$1/s3/aws4_request'."\n".$hashedCanonicalRequest, $policyHeaders); |
|
112 | - $dateKey = hash_hmac('sha256', $matches[1], 'AWS4'.$this->secret, true); |
|
111 | + $stringToSign = preg_replace("/^(.+)\/s3\/aws4_request\\n.+$/s", '$1/s3/aws4_request' . "\n" . $hashedCanonicalRequest, $policyHeaders); |
|
112 | + $dateKey = hash_hmac('sha256', $matches[1], 'AWS4' . $this->secret, true); |
|
113 | 113 | $dateRegionKey = hash_hmac('sha256', $matches[2], $dateKey, true); |
114 | 114 | $dateRegionServiceKey = hash_hmac('sha256', 's3', $dateRegionKey, true); |
115 | 115 | $signingKey = hash_hmac('sha256', 'aws4_request', $dateRegionServiceKey, true); |
@@ -10,27 +10,27 @@ discard block |
||
10 | 10 | { |
11 | 11 | public function boot() |
12 | 12 | { |
13 | - Validator::extend('absolute_or_relative_url', function ($attribute, $value, $parameters, $validator) { |
|
13 | + Validator::extend('absolute_or_relative_url', function($attribute, $value, $parameters, $validator) { |
|
14 | 14 | return starts_with($value, '/') || Validator::make([$attribute => $value], [$attribute => 'url'])->passes(); |
15 | 15 | }, 'The :attribute should be a valid url (absolute or relative)'); |
16 | 16 | |
17 | - Validator::extend('relative_or_secure_url', function ($attribute, $value, $parameters) { |
|
17 | + Validator::extend('relative_or_secure_url', function($attribute, $value, $parameters) { |
|
18 | 18 | return starts_with($value, '/') || filter_var($value, FILTER_VALIDATE_URL) !== false && starts_with($value, 'https'); |
19 | 19 | }, 'The :attribute should be a valid url (relative or https)'); |
20 | 20 | |
21 | - Validator::extend('web_color', function ($attribute, $value, $parameters, $validator) { |
|
21 | + Validator::extend('web_color', function($attribute, $value, $parameters, $validator) { |
|
22 | 22 | return preg_match('/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i', $value); |
23 | 23 | }); |
24 | 24 | |
25 | - Validator::extend('phone_number', function ($attribute, $value, $parameters) { |
|
25 | + Validator::extend('phone_number', function($attribute, $value, $parameters) { |
|
26 | 26 | return preg_match("/^[+]?[0-9\-\ ]*$/", $value); |
27 | 27 | }); |
28 | 28 | |
29 | - Validator::extend('validBlocks', function ($attribute, $value, $parameters, $validator) { |
|
29 | + Validator::extend('validBlocks', function($attribute, $value, $parameters, $validator) { |
|
30 | 30 | foreach ($value as $block) { |
31 | 31 | $cmsBlock = app(BlockRepository::class)->buildFromCmsArray($block, false); |
32 | 32 | |
33 | - $rules = config('cms-toolkit.block_editor.blocks.'.$cmsBlock['type'].'.rules') ?? []; |
|
33 | + $rules = config('cms-toolkit.block_editor.blocks.' . $cmsBlock['type'] . '.rules') ?? []; |
|
34 | 34 | |
35 | 35 | unset($cmsBlock['content']); |
36 | 36 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if (!empty($blockMessages ?? [])) { |
46 | - $validator->errors()->add('block.'.$block['id'], implode('<br>', $blockMessages)); |
|
46 | + $validator->errors()->add('block.' . $block['id'], implode('<br>', $blockMessages)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $blockMessages = []; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'blocks' => Block::class, |
71 | 71 | ]); |
72 | 72 | |
73 | - config(['twill.version' => trim(file_get_contents(__DIR__.'/../VERSION'))]); |
|
73 | + config(['twill.version' => trim(file_get_contents(__DIR__ . '/../VERSION'))]); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function provides() |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | if (config('twill.enabled.media-library')) { |
96 | - $this->app->singleton('imageService', function () { |
|
96 | + $this->app->singleton('imageService', function() { |
|
97 | 97 | return $this->app->make(config('twill.media_library.image_service')); |
98 | 98 | }); |
99 | 99 | } |
100 | 100 | |
101 | 101 | if (config('twill.enabled.file-library')) { |
102 | - $this->app->singleton('fileService', function () { |
|
102 | + $this->app->singleton('fileService', function() { |
|
103 | 103 | return $this->app->make(config('twill.file_library.file_service')); |
104 | 104 | }); |
105 | 105 | } |
@@ -127,9 +127,9 @@ discard block |
||
127 | 127 | private function publishConfigs() |
128 | 128 | { |
129 | 129 | if (config('twill.enabled.users-management')) { |
130 | - config(['auth.providers.users' => require __DIR__.'/../config/auth.php']); |
|
130 | + config(['auth.providers.users' => require __DIR__ . '/../config/auth.php']); |
|
131 | 131 | config(['mail.markdown.paths' => array_merge( |
132 | - [__DIR__.'/../views/emails'], |
|
132 | + [__DIR__ . '/../views/emails'], |
|
133 | 133 | config('mail.markdown.paths') |
134 | 134 | )]); |
135 | 135 | } |
@@ -139,23 +139,23 @@ discard block |
||
139 | 139 | |
140 | 140 | config(['analytics.service_account_credentials_json' => config('twill.dashboard.analytics.service_account_credentials_json', storage_path('app/analytics/service-account-credentials.json'))]); |
141 | 141 | |
142 | - $this->publishes([__DIR__.'/../config/twill-publish.php' => config_path('twill.php')], 'config'); |
|
143 | - $this->publishes([__DIR__.'/../config/twill-navigation.php' => config_path('twill-navigation.php')], 'config'); |
|
142 | + $this->publishes([__DIR__ . '/../config/twill-publish.php' => config_path('twill.php')], 'config'); |
|
143 | + $this->publishes([__DIR__ . '/../config/twill-navigation.php' => config_path('twill-navigation.php')], 'config'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | private function mergeConfigs() |
147 | 147 | { |
148 | - $this->mergeConfigFrom(__DIR__.'/../config/twill.php', 'twill'); |
|
149 | - $this->mergeConfigFrom(__DIR__.'/../config/disks.php', 'filesystems.disks'); |
|
150 | - $this->mergeConfigFrom(__DIR__.'/../config/frontend.php', 'twill.frontend'); |
|
151 | - $this->mergeConfigFrom(__DIR__.'/../config/debug.php', 'twill.debug'); |
|
152 | - $this->mergeConfigFrom(__DIR__.'/../config/seo.php', 'twill.seo'); |
|
153 | - $this->mergeConfigFrom(__DIR__.'/../config/blocks.php', 'twill.block_editor'); |
|
154 | - $this->mergeConfigFrom(__DIR__.'/../config/enabled.php', 'twill.enabled'); |
|
155 | - $this->mergeConfigFrom(__DIR__.'/../config/imgix.php', 'twill.imgix'); |
|
156 | - $this->mergeConfigFrom(__DIR__.'/../config/media-library.php', 'twill.media_library'); |
|
157 | - $this->mergeConfigFrom(__DIR__.'/../config/file-library.php', 'twill.file_library'); |
|
158 | - $this->mergeConfigFrom(__DIR__.'/../config/cloudfront.php', 'services'); |
|
148 | + $this->mergeConfigFrom(__DIR__ . '/../config/twill.php', 'twill'); |
|
149 | + $this->mergeConfigFrom(__DIR__ . '/../config/disks.php', 'filesystems.disks'); |
|
150 | + $this->mergeConfigFrom(__DIR__ . '/../config/frontend.php', 'twill.frontend'); |
|
151 | + $this->mergeConfigFrom(__DIR__ . '/../config/debug.php', 'twill.debug'); |
|
152 | + $this->mergeConfigFrom(__DIR__ . '/../config/seo.php', 'twill.seo'); |
|
153 | + $this->mergeConfigFrom(__DIR__ . '/../config/blocks.php', 'twill.block_editor'); |
|
154 | + $this->mergeConfigFrom(__DIR__ . '/../config/enabled.php', 'twill.enabled'); |
|
155 | + $this->mergeConfigFrom(__DIR__ . '/../config/imgix.php', 'twill.imgix'); |
|
156 | + $this->mergeConfigFrom(__DIR__ . '/../config/media-library.php', 'twill.media_library'); |
|
157 | + $this->mergeConfigFrom(__DIR__ . '/../config/file-library.php', 'twill.file_library'); |
|
158 | + $this->mergeConfigFrom(__DIR__ . '/../config/cloudfront.php', 'services'); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | private function publishMigrations() |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | foreach ($optionalMigrations as $migration => $feature) { |
178 | - if (config('twill.enabled.'.$feature)) { |
|
178 | + if (config('twill.enabled.' . $feature)) { |
|
179 | 179 | $this->publishMigration($migration); |
180 | 180 | } |
181 | 181 | } |
@@ -187,14 +187,14 @@ discard block |
||
187 | 187 | if (!class_exists($migration)) { |
188 | 188 | $timestamp = date('Y_m_d_His', time()); |
189 | 189 | $this->publishes([ |
190 | - __DIR__.'/../migrations/'.snake_case($migration).'.php' => database_path('migrations/'.$timestamp.'_'.snake_case($migration).'.php'), |
|
190 | + __DIR__ . '/../migrations/' . snake_case($migration) . '.php' => database_path('migrations/' . $timestamp . '_' . snake_case($migration) . '.php'), |
|
191 | 191 | ], 'migrations'); |
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | 195 | private function registerAndPublishViews() |
196 | 196 | { |
197 | - $viewPath = __DIR__.'/../views'; |
|
197 | + $viewPath = __DIR__ . '/../views'; |
|
198 | 198 | |
199 | 199 | $this->loadViewsFrom($viewPath, 'twill'); |
200 | 200 | $this->publishes([$viewPath => resource_path('views/vendor/twill')], 'views'); |
@@ -213,30 +213,30 @@ discard block |
||
213 | 213 | |
214 | 214 | private function requireHelpers() |
215 | 215 | { |
216 | - require_once __DIR__.'/Helpers/routes_helpers.php'; |
|
217 | - require_once __DIR__.'/Helpers/i18n_helpers.php'; |
|
218 | - require_once __DIR__.'/Helpers/media_library_helpers.php'; |
|
219 | - require_once __DIR__.'/Helpers/frontend_helpers.php'; |
|
220 | - require_once __DIR__.'/Helpers/migrations_helpers.php'; |
|
221 | - require_once __DIR__.'/Helpers/helpers.php'; |
|
216 | + require_once __DIR__ . '/Helpers/routes_helpers.php'; |
|
217 | + require_once __DIR__ . '/Helpers/i18n_helpers.php'; |
|
218 | + require_once __DIR__ . '/Helpers/media_library_helpers.php'; |
|
219 | + require_once __DIR__ . '/Helpers/frontend_helpers.php'; |
|
220 | + require_once __DIR__ . '/Helpers/migrations_helpers.php'; |
|
221 | + require_once __DIR__ . '/Helpers/helpers.php'; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | private function publishPublicAssets() |
225 | 225 | { |
226 | - $this->publishes([__DIR__.'/../assets' => public_path('assets')], 'assets'); |
|
226 | + $this->publishes([__DIR__ . '/../assets' => public_path('assets')], 'assets'); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | private function includeView($view, $expression) |
230 | 230 | { |
231 | 231 | list($name) = str_getcsv($expression, ',', '\''); |
232 | 232 | |
233 | - $partialNamespace = view()->exists('admin.'.$view.$name) ? 'admin.' : 'twill::'; |
|
233 | + $partialNamespace = view()->exists('admin.' . $view . $name) ? 'admin.' : 'twill::'; |
|
234 | 234 | |
235 | - $view = $partialNamespace.$view.$name; |
|
235 | + $view = $partialNamespace . $view . $name; |
|
236 | 236 | |
237 | 237 | $expression = explode(',', $expression); |
238 | 238 | array_shift($expression); |
239 | - $expression = '('.implode(',', $expression).')'; |
|
239 | + $expression = '(' . implode(',', $expression) . ')'; |
|
240 | 240 | if ($expression === '()') { |
241 | 241 | $expression = '([])'; |
242 | 242 | } |
@@ -248,20 +248,20 @@ discard block |
||
248 | 248 | { |
249 | 249 | $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler(); |
250 | 250 | |
251 | - $blade->directive('dd', function ($param) { |
|
251 | + $blade->directive('dd', function($param) { |
|
252 | 252 | return "<?php dd({$param}); ?>"; |
253 | 253 | }); |
254 | 254 | |
255 | - $blade->directive('dumpData', function ($data) { |
|
255 | + $blade->directive('dumpData', function($data) { |
|
256 | 256 | return sprintf("<?php (new Illuminate\Support\Debug\Dumper)->dump(%s); exit; ?>", |
257 | 257 | null != $data ? $data : 'get_defined_vars()'); |
258 | 258 | }); |
259 | 259 | |
260 | - $blade->directive('formField', function ($expression) use ($blade) { |
|
260 | + $blade->directive('formField', function($expression) use ($blade) { |
|
261 | 261 | return $this->includeView('partials.form._', $expression); |
262 | 262 | }); |
263 | 263 | |
264 | - $blade->directive('partialView', function ($expression) use ($blade) { |
|
264 | + $blade->directive('partialView', function($expression) use ($blade) { |
|
265 | 265 | $expressionAsArray = str_getcsv($expression, ',', '\''); |
266 | 266 | |
267 | 267 | list($moduleName, $viewName) = $expressionAsArray; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $viewModule = "'admin.'.$moduleName.'.{$viewName}'"; |
271 | 271 | $viewApplication = "'admin.partials.{$viewName}'"; |
272 | 272 | $viewModuleTwill = "'twill::'.$moduleName.'.{$viewName}'"; |
273 | - $view = $partialNamespace.'.'.$viewName; |
|
273 | + $view = $partialNamespace . '.' . $viewName; |
|
274 | 274 | |
275 | 275 | if (!isset($moduleName) || is_null($moduleName)) { |
276 | 276 | $viewModule = $viewApplication; |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | $expression = explode(',', $expression); |
280 | 280 | $expression = array_slice($expression, 2); |
281 | - $expression = '('.implode(',', $expression).')'; |
|
281 | + $expression = '(' . implode(',', $expression) . ')'; |
|
282 | 282 | if ($expression === '()') { |
283 | 283 | $expression = '([])'; |
284 | 284 | } |
@@ -296,14 +296,14 @@ discard block |
||
296 | 296 | ?>"; |
297 | 297 | }); |
298 | 298 | |
299 | - $blade->directive('pushonce', function ($expression) { |
|
299 | + $blade->directive('pushonce', function($expression) { |
|
300 | 300 | list($pushName, $pushSub) = explode(':', trim(substr($expression, 1, -1))); |
301 | - $key = '__pushonce_'.$pushName.'_'.str_replace('-', '_', $pushSub); |
|
301 | + $key = '__pushonce_' . $pushName . '_' . str_replace('-', '_', $pushSub); |
|
302 | 302 | |
303 | 303 | return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>"; |
304 | 304 | }); |
305 | 305 | |
306 | - $blade->directive('endpushonce', function () { |
|
306 | + $blade->directive('endpushonce', function() { |
|
307 | 307 | return '<?php $__env->stopPush(); endif; ?>'; |
308 | 308 | }); |
309 | 309 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | |
325 | 325 | View::composer('twill::partials.navigation.*', ActiveNavigation::class); |
326 | 326 | |
327 | - View::composer(['admin.*', 'templates.*', 'twill::*'], function ($view) { |
|
327 | + View::composer(['admin.*', 'templates.*', 'twill::*'], function($view) { |
|
328 | 328 | $with = array_merge([ |
329 | 329 | 'renderForBlocks' => false, |
330 | 330 | 'renderForModal' => false, |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | |
337 | 337 | private function registerAndPublishTranslations() |
338 | 338 | { |
339 | - $translationPath = __DIR__.'/../lang'; |
|
339 | + $translationPath = __DIR__ . '/../lang'; |
|
340 | 340 | |
341 | 341 | $this->loadTranslationsFrom($translationPath, 'twill'); |
342 | 342 | $this->publishes([$translationPath => resource_path('lang/vendor/twill')], 'translations'); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | { |
6 | 6 | $scheme = config("filesystems.disks.{$disk}.use_https") ? 'https://' : ''; |
7 | 7 | |
8 | - return $scheme.config("filesystems.disks.{$disk}.bucket").'.'.Storage::disk($disk)->getAdapter()->getClient()->getEndpoint()->getHost(); |
|
8 | + return $scheme . config("filesystems.disks.{$disk}.bucket") . '.' . Storage::disk($disk)->getAdapter()->getClient()->getEndpoint()->getHost(); |
|
9 | 9 | } |
10 | 10 | } |
11 | 11 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $bytes /= 1024; |
19 | 19 | } |
20 | 20 | |
21 | - return round($bytes, 2).' '.$units[$i]; |
|
21 | + return round($bytes, 2) . ' ' . $units[$i]; |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |
@@ -5,19 +5,19 @@ discard block |
||
5 | 5 | { |
6 | 6 | if (!app()->environment('local', 'development')) { |
7 | 7 | try { |
8 | - $manifest = Cache::rememberForever('rev-manifest', function () { |
|
8 | + $manifest = Cache::rememberForever('rev-manifest', function() { |
|
9 | 9 | return json_decode(file_get_contents(config('twill.frontend.rev_manifest_path')), true); |
10 | 10 | }); |
11 | 11 | |
12 | 12 | if (isset($manifest[$file])) { |
13 | - return (rtrim(config('twill.frontend.dist_assets_path'), '/').'/').$manifest[$file]; |
|
13 | + return (rtrim(config('twill.frontend.dist_assets_path'), '/') . '/') . $manifest[$file]; |
|
14 | 14 | } |
15 | 15 | } catch (\Exception $e) { |
16 | - return '/'.$file; |
|
16 | + return '/' . $file; |
|
17 | 17 | } |
18 | 18 | } |
19 | 19 | |
20 | - return (rtrim(config('twill.frontend.dev_assets_path'), '/').'/').$file; |
|
20 | + return (rtrim(config('twill.frontend.dev_assets_path'), '/') . '/') . $file; |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | */ |
28 | 28 | function icon($name, $opts = []) |
29 | 29 | { |
30 | - $title = isset($opts['title']) ? ' title="'.htmlentities($opts['title'], ENT_QUOTES, 'UTF-8').'" ' : ''; |
|
31 | - $role = isset($opts['role']) ? ' role="'.htmlentities($opts['role'], ENT_QUOTES, 'UTF-8').'" ' : ' role="presentation" '; |
|
30 | + $title = isset($opts['title']) ? ' title="' . htmlentities($opts['title'], ENT_QUOTES, 'UTF-8') . '" ' : ''; |
|
31 | + $role = isset($opts['role']) ? ' role="' . htmlentities($opts['role'], ENT_QUOTES, 'UTF-8') . '" ' : ' role="presentation" '; |
|
32 | 32 | $css_class = isset($opts['css_class']) ? htmlentities($opts['css_class'], ENT_QUOTES, 'UTF-8') : ''; |
33 | - $svg_link = config('twill.frontend.svg_sprites_use_hash_only') ? "#icon--$name" : revAsset(config('twill.frontend.svg_sprites_path'))."#icon--$name"; |
|
33 | + $svg_link = config('twill.frontend.svg_sprites_use_hash_only') ? "#icon--$name" : revAsset(config('twill.frontend.svg_sprites_path')) . "#icon--$name"; |
|
34 | 34 | |
35 | - return "<svg class=\"icon--$name $css_class\" $title $role><use xlink:href=\"".$svg_link.'"></use></svg>'; |
|
35 | + return "<svg class=\"icon--$name $css_class\" $title $role><use xlink:href=\"" . $svg_link . '"></use></svg>'; |
|
36 | 36 | } |
37 | 37 | } |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $table->foreign("{$table1NameSingular}_id")->references('id')->on($table1NamePlural)->onDelete('cascade'); |
77 | 77 | $table->integer("{$table2NameSingular}_id")->unsigned(); |
78 | 78 | $table->foreign("{$table2NameSingular}_id")->references('id')->on($table2NamePlural)->onDelete('cascade'); |
79 | - $table->index(["{$table2NameSingular}_id", "{$table1NameSingular}_id"], "idx_{$table1NameSingular}_{$table2NameSingular}_".str_random(5)); |
|
79 | + $table->index(["{$table2NameSingular}_id", "{$table1NameSingular}_id"], "idx_{$table1NameSingular}_{$table2NameSingular}_" . str_random(5)); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | if (!function_exists('moduleRoute')) { |
4 | 4 | function moduleRoute($moduleName, $prefix, $action, $parameters = [], $absolute = true) |
5 | 5 | { |
6 | - $routeName = 'admin.'.($prefix ? $prefix.'.' : '').camel_case($moduleName).'.'.$action; |
|
6 | + $routeName = 'admin.' . ($prefix ? $prefix . '.' : '') . camel_case($moduleName) . '.' . $action; |
|
7 | 7 | |
8 | 8 | return route($routeName, $parameters, $absolute); |
9 | 9 | } |