@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | Blade::directive('jslocalization', function($expression) { |
22 | 22 | $auxExpression = explode(',', str_replace(['(', ')', ' ', '"', "'"], '', $expression)); |
23 | - if (count($auxExpression) > 2) { |
|
23 | + if (count($auxExpression)>2) { |
|
24 | 24 | $langfile = $auxExpression[0]; |
25 | 25 | $group = $auxExpression[1]; |
26 | 26 | $basevar = $auxExpression[2]; |
27 | - } elseif (count($auxExpression) > 1) { |
|
27 | + } elseif (count($auxExpression)>1) { |
|
28 | 28 | $langfile = $auxExpression[0]; |
29 | 29 | $group = $auxExpression[1]; |
30 | 30 | $basevar = ""; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | Blade::directive('jsmodel', function($expression) { |
40 | 40 | $auxExpression = explode(',', str_replace(['(', ')', ' ', '"', "'"], '', $expression)); |
41 | 41 | //echo "<pre>" . print_r($auxExpression, true) . "</pre>"; |
42 | - if (count($auxExpression) > 1) { |
|
42 | + if (count($auxExpression)>1) { |
|
43 | 43 | if ($auxExpression[0] == 'Auth::user') { |
44 | 44 | $model = \Auth::user(); |
45 | 45 | } else { |
@@ -107,7 +107,7 @@ |
||
107 | 107 | } |
108 | 108 | $jsarray = json_encode($model); |
109 | 109 | return "<script>{$variable} = {$jsarray};</script>"; |
110 | - }else{ |
|
110 | + } else { |
|
111 | 111 | |
112 | 112 | } |
113 | 113 | } |
@@ -101,13 +101,13 @@ |
||
101 | 101 | } |
102 | 102 | $jsarray = $model->toJson(); |
103 | 103 | return "<script>{$variable} = {$jsarray};</script>"; |
104 | - }elseif (is_array($model)) { |
|
104 | + } elseif (is_array($model)) { |
|
105 | 105 | if ($variable == "") { |
106 | 106 | $variable = "varArray"; |
107 | 107 | } |
108 | 108 | $jsarray = json_encode($model); |
109 | 109 | return "<script>{$variable} = {$jsarray};</script>"; |
110 | - }else{ |
|
110 | + } else{ |
|
111 | 111 | |
112 | 112 | } |
113 | 113 | } |