@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | $data = $this->buildData(); |
28 | - $data['forum'] = $forum; |
|
28 | + $data[ 'forum' ] = $forum; |
|
29 | 29 | |
30 | 30 | return view('laravel-forum::forum.forum', $data); |
31 | 31 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $data = $this->buildData(); |
42 | - $data['forum'] = $forum; |
|
42 | + $data[ 'forum' ] = $forum; |
|
43 | 43 | |
44 | 44 | return view('laravel-forum::forum.createPost', $data); |
45 | 45 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $post = ForumPost::with('replies')->where('id', $post_id)->firstOrFail(); |
51 | 51 | |
52 | 52 | $data = $this->buildData(); |
53 | - $data['post'] = $post; |
|
53 | + $data[ 'post' ] = $post; |
|
54 | 54 | |
55 | 55 | return view('laravel-forum::forum.thread', $data); |
56 | 56 | } catch (Exception $e) { |
@@ -54,6 +54,6 @@ |
||
54 | 54 | */ |
55 | 55 | public function routes() |
56 | 56 | { |
57 | - require __DIR__ . '/Http/routes.php'; |
|
57 | + require __DIR__.'/Http/routes.php'; |
|
58 | 58 | } |
59 | 59 | } |
@@ -6,28 +6,28 @@ |
||
6 | 6 | $widgets = [ |
7 | 7 | |
8 | 8 | 'forum' => [ |
9 | - 'count' => $counts['forum'], |
|
9 | + 'count' => $counts[ 'forum' ], |
|
10 | 10 | 'class' => 'bg-info', |
11 | 11 | 'title' => 'Forums', |
12 | 12 | 'size' => 2, |
13 | 13 | ], |
14 | 14 | |
15 | 15 | 'category' => [ |
16 | - 'count' => $counts['category'], |
|
16 | + 'count' => $counts[ 'category' ], |
|
17 | 17 | 'class' => 'bg-primary', |
18 | 18 | 'title' => 'Categories', |
19 | 19 | 'size' => 2, |
20 | 20 | ], |
21 | 21 | |
22 | 22 | 'post' => [ |
23 | - 'count' => $counts['post'], |
|
23 | + 'count' => $counts[ 'post' ], |
|
24 | 24 | 'class' => 'bg-success', |
25 | 25 | 'title' => 'Posts', |
26 | 26 | 'size' => 2, |
27 | 27 | ], |
28 | 28 | |
29 | 29 | 'reply' => [ |
30 | - 'count' => $counts['reply'], |
|
30 | + 'count' => $counts[ 'reply' ], |
|
31 | 31 | 'class' => 'bg-warning', |
32 | 32 | 'title' => 'Replies', |
33 | 33 | 'size' => 2, |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | - if(isset($wysiwyg)) { |
|
3 | - $wysiwygInclude = $wysiwyg['include']; |
|
2 | + if (isset($wysiwyg)) { |
|
3 | + $wysiwygInclude = $wysiwyg[ 'include' ]; |
|
4 | 4 | |
5 | - switch ($wysiwyg['name']) { |
|
5 | + switch ($wysiwyg[ 'name' ]) { |
|
6 | 6 | case 'tinymce': |
7 | 7 | $js = '//tinymce.cachefly.net/4.2/tinymce.min.js'; |
8 | 8 | $css = null; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | @if (isset($wysiwygInclude)) |
34 | 34 | <script type="application/javascript"> |
35 | - <?=$init;?> |
|
35 | + <?=$init; ?> |
|
36 | 36 | </script> |
37 | 37 | @endif |
38 | 38 |
@@ -33,8 +33,8 @@ |
||
33 | 33 | $replyCount = count($post->replies); |
34 | 34 | $lastReply = $post->lastReply(); |
35 | 35 | if (isset($lastReply)) { |
36 | - $replyAuthor = $lastReply['author']; |
|
37 | - $replyDate = $lastReply['date']; |
|
36 | + $replyAuthor = $lastReply[ 'author' ]; |
|
37 | + $replyDate = $lastReply[ 'date' ]; |
|
38 | 38 | } |
39 | 39 | ?> |
40 | 40 | <tr> |
@@ -2,20 +2,20 @@ |
||
2 | 2 | |
3 | 3 | @section('breadcrumbs') |
4 | 4 | <?php |
5 | - $postCounts = []; |
|
5 | + $postCounts = [ ]; |
|
6 | 6 | |
7 | 7 | /* Add Post Authors post count to postCounts array */ |
8 | - $postCounts[$post->author->id] = $userHelper->getPostCount($post->author->id); |
|
8 | + $postCounts[ $post->author->id ] = $userHelper->getPostCount($post->author->id); |
|
9 | 9 | |
10 | 10 | $forum = $post->forum; |
11 | 11 | $body = $sanitizer->sanitize($post->body); |
12 | 12 | $sticky = (bool)$post->sticky; |
13 | 13 | $locked = (bool)$post->locked; |
14 | 14 | if ($locked) { |
15 | - $title = 'Locked: ' . $post->title; |
|
15 | + $title = 'Locked: '.$post->title; |
|
16 | 16 | } else { |
17 | 17 | if ($sticky) { |
18 | - $title = 'Sticky: ' . $post->title; |
|
18 | + $title = 'Sticky: '.$post->title; |
|
19 | 19 | } else { |
20 | 20 | $title = $post->title; |
21 | 21 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | - if(isset($wysiwyg)) { |
|
3 | - $wysiwygInclude = $wysiwyg['include']; |
|
2 | + if (isset($wysiwyg)) { |
|
3 | + $wysiwygInclude = $wysiwyg[ 'include' ]; |
|
4 | 4 | |
5 | - switch ($wysiwyg['name']) { |
|
5 | + switch ($wysiwyg[ 'name' ]) { |
|
6 | 6 | case 'tinymce': |
7 | 7 | $js = '//tinymce.cachefly.net/4.2/tinymce.min.js'; |
8 | 8 | $css = null; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | <textarea name="body" class="form-control"></textarea> |
30 | 30 | @if (isset($wysiwygInclude)) |
31 | 31 | <script type="application/javascript"> |
32 | - <?=$init;?> |
|
32 | + <?=$init; ?> |
|
33 | 33 | </script> |
34 | 34 | @endif |
35 | 35 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | @endif |
36 | 36 | } |
37 | 37 | </script> |
38 | -<div class="modal fade" id="<?=$modal_id;?>" tabindex="-1" role="dialog" aria-hidden="true"> |
|
38 | +<div class="modal fade" id="<?=$modal_id; ?>" tabindex="-1" role="dialog" aria-hidden="true"> |
|
39 | 39 | <div class="modal-dialog"> |
40 | 40 | <div class="modal-content"> |
41 | 41 | <div class="modal-header"> |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | @if(in_array($f['type'], ['text', 'url', 'date', 'datetime', 'time', 'email', 'number'])) |
56 | 56 | <div class="input-group"> |
57 | 57 | <label class="label" for="{{ $f['name'] }}">{{ $f['label'] or ucfirst($f['name']) }}</label> |
58 | - <input class="form-control" id="{{ $f['name'] }}" <?php if(isset($f['value'])) { echo 'value="'. $f['value'] .'" '; } ?>type="{{ $f['type'] }}" placeholder="{{ $f['name'] }}" <?php if(isset($f['required']) && $f['required']) { echo 'required'; } ?> /> |
|
58 | + <input class="form-control" id="{{ $f['name'] }}" <?php if (isset($f[ 'value' ])) { echo 'value="'.$f[ 'value' ].'" '; } ?>type="{{ $f['type'] }}" placeholder="{{ $f['name'] }}" <?php if (isset($f[ 'required' ]) && $f[ 'required' ]) { echo 'required'; } ?> /> |
|
59 | 59 | </div> |
60 | 60 | @elseif(in_array($f['type'], ['select'])) |
61 | 61 | <div class="input-group"> |
62 | 62 | <label class="label" for="{{ $f['name'] }}">{{ $f['label'] or ucfirst($f['name']) }}</label> |
63 | 63 | <select id="{{ $f['name'] }}" class="form-control"> |
64 | - <?php $optionField = $f['field']; |
|
64 | + <?php $optionField = $f[ 'field' ]; |
|
65 | 65 | if (strpos($optionField, '.') !== false) { |
66 | 66 | $optionFields = explode('.', $optionField); |
67 | 67 | } |
@@ -24,6 +24,6 @@ |
||
24 | 24 | */ |
25 | 25 | public function broadcastOn() |
26 | 26 | { |
27 | - return ['laravel-forum']; |
|
27 | + return [ 'laravel-forum' ]; |
|
28 | 28 | } |
29 | 29 | } |