Skip to content

Commit 6746552

Browse files
committed
Cleanup
1 parent 40b5c8d commit 6746552

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

app/Lio/Forum/Threads/Thread.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ class Thread extends Entity implements PresenterInterface
1010
{
1111
use SoftDeletingTrait;
1212

13-
protected $table = 'forum_threads';
13+
protected $table = 'forum_threads';
1414
protected $fillable = ['subject', 'body', 'author_id', 'is_question', 'solution_reply_id', 'category_slug', 'laravel_version', 'ip'];
15-
protected $dates = ['deleted_at'];
15+
protected $dates = ['deleted_at'];
1616

1717
protected $validationRules = [
18-
'body' => 'required',
18+
'body' => 'required',
1919
'author_id' => 'required|exists:users,id',
2020
];
2121

app/controllers/Api/Forum/ForumThreadsController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class ForumThreadsController extends BaseController
1515
public function __construct(ThreadRepository $threads, TagRepository $tags)
1616
{
1717
$this->threads = $threads;
18-
$this->tags = $tags;
18+
$this->tags = $tags;
1919
}
2020

2121
public function getIndex($status = '')
2222
{
2323
$threadCount = Input::get('take', $this->threadsPerPage);
24-
$tags = $this->tags->getAllTagsBySlug(Input::get('tags'));
25-
$threads = $this->threads->getByTagsAndStatusPaginated($tags, $status, $threadCount);
24+
$tags = $this->tags->getAllTagsBySlug(Input::get('tags'));
25+
$threads = $this->threads->getByTagsAndStatusPaginated($tags, $status, $threadCount);
2626

2727
$collection = $threads->getCollection();
2828

app/controllers/Forum/ForumThreadsController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public function getIndex($status = '')
4545

4646
// add the tag string to each pagination link
4747
$tagAppends = ['tags' => Input::get('tags')];
48-
$queryString = !empty($tagAppends['tags']) ? '?tags=' . implode(',', (array)$tagAppends['tags']) : '';
48+
$queryString = ! empty($tagAppends['tags']) ? '?tags=' . implode(',', (array) $tagAppends['tags']) : '';
4949
$threads->appends($tagAppends);
5050
$this->createSections(Input::get('tags'));
5151

52-
$this->title = "Forum";
52+
$this->title = 'Forum';
5353
$this->view('forum.threads.index', compact('threads', 'tags', 'queryString'));
5454
}
5555

@@ -58,7 +58,7 @@ public function getShowThread($threadSlug)
5858
{
5959
$thread = $this->threads->getBySlug($threadSlug);
6060

61-
if ( ! $thread) {
61+
if (! $thread) {
6262
return $this->redirectAction('ForumThreadsController@getIndex');
6363
}
6464

app/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
});
9595

9696
Route::get('forum/{status?}', ['as' => 'home', 'uses' => 'ForumThreadsController@getIndex'])
97-
->where(array('status' => '(|open|solved)'));
97+
->where(['status' => '(open|solved)']);
9898

9999
Route::get('forum/search', 'ForumThreadsController@getSearch');
100100
Route::get('forum/{slug}/reply/{commentId}', 'ForumRepliesController@getReplyRedirect');

app/views/forum/threads/index.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="header">
1010
<h1>Forum</h1>
1111
{{-- Display select tags --}}
12-
@if(Input::get('tags', null))
12+
@if (Input::get('tags', null))
1313
<div class="tags">
1414
{{ Input::get('tags') }}
1515
</div>
@@ -31,9 +31,9 @@
3131
@each('forum.threads._index_summary', $threads, 'thread')
3232

3333
{{-- If no comments are found display a message --}}
34-
@if( ! $threads->count())
34+
@if (! $threads->count())
3535
<div class="empty-state">
36-
@if(Input::get('tags'))
36+
@if (Input::get('tags'))
3737
<h3>No threads found that are tagged with {{ Input::get('tags') }}</h3>
3838
@else
3939
<h3>No threads found.</h3>

0 commit comments

Comments
 (0)