@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | class ReportController extends Controller |
10 | 10 | { |
11 | - public function index(){ |
|
11 | + public function index() { |
|
12 | 12 | $r = UserReport::all(); |
13 | 13 | |
14 | 14 | return view('reports.index', [ |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | ]); |
17 | 17 | } |
18 | 18 | |
19 | - public function create_game_report($gameid){ |
|
19 | + public function create_game_report($gameid) { |
|
20 | 20 | $g = Game::whereId($gameid)->first(); |
21 | 21 | |
22 | 22 | return view('reports.create', [ |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | ]); |
25 | 25 | } |
26 | 26 | |
27 | - public function store_game_report(Request $request, $gameid){ |
|
27 | + public function store_game_report(Request $request, $gameid) { |
|
28 | 28 | $r = new UserReport; |
29 | 29 | $r->content_id = $gameid; |
30 | 30 | $r->content_type = 'game'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return redirect()->action('ReportController@index_user', [\Auth::id()]); |
36 | 36 | } |
37 | 37 | |
38 | - public function index_user($userid){ |
|
38 | + public function index_user($userid) { |
|
39 | 39 | $ur = UserReport::whereUserId($userid); |
40 | 40 | |
41 | 41 | return view('reports.index_user', [ |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | class GameFileController extends Controller |
14 | 14 | { |
15 | 15 | |
16 | - public function download($id){ |
|
16 | + public function download($id) { |
|
17 | 17 | |
18 | 18 | \DB::table('games_files') |
19 | 19 | ->where('id', '=', $id) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return response()->download($filepath, $newfilename); |
52 | 52 | } |
53 | 53 | |
54 | - public function download_wo_count(Request $request){ |
|
54 | + public function download_wo_count(Request $request) { |
|
55 | 55 | $filepath = storage_path('app/public/'.$request->get('filename')); |
56 | 56 | |
57 | 57 | $newfilename = $request->get('id'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return response()->download($filepath, $newfilename); |
60 | 60 | } |
61 | 61 | |
62 | - public function create($id){ |
|
62 | + public function create($id) { |
|
63 | 63 | $gamefiles = \DB::table('games_files') |
64 | 64 | ->select([ |
65 | 65 | 'games_files.id as fileid', |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | ]); |
104 | 104 | } |
105 | 105 | |
106 | - public function store(Request $request, $id){ |
|
106 | + public function store(Request $request, $id) { |
|
107 | 107 | |
108 | 108 | $this->validate($request, [ |
109 | 109 | 'uuid' => 'required', |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | $exists = \Storage::disk('local')->exists($storagetemp); |
125 | 125 | |
126 | - if($exists === true){ |
|
126 | + if ($exists === true) { |
|
127 | 127 | \Storage::move($storagetemp, $storagedest); |
128 | 128 | |
129 | 129 | \DB::table('games_files')->insert([ |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | } |
149 | 149 | |
150 | - public function destroy(Request $request, $id, $fileid){ |
|
150 | + public function destroy(Request $request, $id, $fileid) { |
|
151 | 151 | |
152 | 152 | $gf = GamesFile::whereId($fileid)->first(); |
153 | 153 | \Storage::delete($gf->filename); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | return redirect()->route('gamefiles.index', [$id]); |
158 | 158 | } |
159 | 159 | |
160 | - public function edit($id, $gamefileid){ |
|
160 | + public function edit($id, $gamefileid) { |
|
161 | 161 | $gamefile = GamesFile::whereId($gamefileid)->first(); |
162 | 162 | $filetypes = GamesFilesType::get(); |
163 | 163 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | ]); |
168 | 168 | } |
169 | 169 | |
170 | - public function update(Request $request, $id, $gamefileid){ |
|
170 | + public function update(Request $request, $id, $gamefileid) { |
|
171 | 171 | $this->validate($request, [ |
172 | 172 | //'uuid' => 'required', |
173 | 173 | 'version' => 'required', |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $gamefile->release_year = $request->get('releasedate_year'); |
186 | 186 | $gamefile->release_type = $request->get('filetype'); |
187 | 187 | |
188 | - if($request->get('uuid')){ |
|
188 | + if ($request->get('uuid')) { |
|
189 | 189 | \Storage::delete($gamefile->filename); |
190 | 190 | |
191 | 191 | $storagetemp = 'temp/'.$request->get('uuid').'/file'; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | $exists = \Storage::disk('local')->exists($storagetemp); |
199 | 199 | |
200 | - if($exists === true){ |
|
200 | + if ($exists === true) { |
|
201 | 201 | \Storage::move($storagetemp, $storagedest); |
202 | 202 | $gamefile->filesize = $meta['size']; |
203 | 203 | $gamefile->extension = $meta['ext']; |
@@ -206,10 +206,10 @@ discard block |
||
206 | 206 | } |
207 | 207 | } |
208 | 208 | |
209 | - if($request->get('forbidden') && ($request->get('forbidden') <> '')){ |
|
209 | + if ($request->get('forbidden') && ($request->get('forbidden') <> '')) { |
|
210 | 210 | $gamefile->forbidden = 1; |
211 | 211 | $gamefile->reason = $request->get('forbidden'); |
212 | - }else{ |
|
212 | + }else { |
|
213 | 213 | $gamefile->forbidden = 0; |
214 | 214 | $gamefile->reason = ''; |
215 | 215 | } |
@@ -209,7 +209,7 @@ |
||
209 | 209 | if($request->get('forbidden') && ($request->get('forbidden') <> '')){ |
210 | 210 | $gamefile->forbidden = 1; |
211 | 211 | $gamefile->reason = $request->get('forbidden'); |
212 | - }else{ |
|
212 | + } else{ |
|
213 | 213 | $gamefile->forbidden = 0; |
214 | 214 | $gamefile->reason = ''; |
215 | 215 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | class ShoutboxController extends Controller |
11 | 11 | { |
12 | - public function store(Request $request){ |
|
12 | + public function store(Request $request) { |
|
13 | 13 | $this->validate($request, [ |
14 | 14 | 'shout' => 'required', |
15 | 15 | ]); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | return redirect()->route('home'); |
28 | 28 | } |
29 | 29 | |
30 | - public function index(){ |
|
30 | + public function index() { |
|
31 | 31 | $shoutbox = Shoutbox::with('user')->orderBy('created_at', 'desc')->paginate(25); |
32 | 32 | |
33 | 33 | $elo = \DB::table('shoutbox') |
@@ -8,11 +8,11 @@ discard block |
||
8 | 8 | |
9 | 9 | class UserListController extends Controller |
10 | 10 | { |
11 | - public function create(){ |
|
11 | + public function create() { |
|
12 | 12 | return view('users.lists.create'); |
13 | 13 | } |
14 | 14 | |
15 | - public function store(Request $request){ |
|
15 | + public function store(Request $request) { |
|
16 | 16 | $this->validate($request, [ |
17 | 17 | 'title' => 'required', |
18 | 18 | 'desc' => 'required', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return \Redirect::back(); |
30 | 30 | } |
31 | 31 | |
32 | - public function delete_game($listid, $itemid){ |
|
32 | + public function delete_game($listid, $itemid) { |
|
33 | 33 | $item = \DB::table('user_list_items') |
34 | 34 | ->where('list_id', '=', $listid) |
35 | 35 | ->where('content_id', '=', $itemid) |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | return \Redirect::back(); |
40 | 40 | } |
41 | 41 | |
42 | - public function delete($listid){ |
|
43 | - if(\Auth::check()){ |
|
44 | - if(\Auth::user()->hasRole('admin')){ |
|
42 | + public function delete($listid) { |
|
43 | + if (\Auth::check()) { |
|
44 | + if (\Auth::user()->hasRole('admin')) { |
|
45 | 45 | $item = \DB::table('user_list_items') |
46 | 46 | ->where('list_id', '=', $listid) |
47 | 47 | ->delete(); |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | $list = \DB::table('user_lists') |
50 | 50 | ->where('id', '=', $listid) |
51 | 51 | ->delete(); |
52 | - }else{ |
|
52 | + }else { |
|
53 | 53 | $list = \DB::table('user_lists') |
54 | 54 | ->where('id', '=', $listid) |
55 | 55 | ->where('user_id', '=', \Auth::id()) |
56 | 56 | ->get(); |
57 | 57 | |
58 | - if($list->count() <> 0){ |
|
58 | + if ($list->count() <> 0) { |
|
59 | 59 | $list = \DB::table('user_lists') |
60 | 60 | ->where('id', '=', $listid) |
61 | 61 | ->delete(); |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | return \Redirect::back(); |
71 | 71 | } |
72 | 72 | |
73 | - public function add_game(Request $request, $listid, $gameid){ |
|
74 | - if(\Auth::check()){ |
|
73 | + public function add_game(Request $request, $listid, $gameid) { |
|
74 | + if (\Auth::check()) { |
|
75 | 75 | $check = \DB::table('user_list_items') |
76 | 76 | ->where('content_id', '=', $gameid) |
77 | 77 | ->where('content_type', '=', 'game') |
78 | 78 | ->where('list_id', '=', $listid) |
79 | 79 | ->get(); |
80 | - if($check->count() == 0){ |
|
80 | + if ($check->count() == 0) { |
|
81 | 81 | \DB::table('user_list_items')->insert([ |
82 | 82 | 'content_id' => $gameid, |
83 | 83 | 'content_type' => 'game', |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return \Redirect::action('GameController@show', $gameid); |
92 | 92 | } |
93 | 93 | |
94 | - public function show($userid, $listid){ |
|
94 | + public function show($userid, $listid) { |
|
95 | 95 | $list = \DB::table('user_lists') |
96 | 96 | ->leftJoin('users', 'users.id', '=', 'user_lists.user_id') |
97 | 97 | ->where('user_lists.id', '=', $listid) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ->leftJoin('games_developer', 'games.id', '=', 'games_developer.game_id') |
103 | 103 | ->leftJoin('developer', 'games_developer.developer_id', '=', 'developer.id') |
104 | 104 | ->leftJoin('makers', 'makers.id', '=', 'games.maker_id') |
105 | - ->leftJoin('comments', function($join){ |
|
105 | + ->leftJoin('comments', function($join) { |
|
106 | 106 | $join->on('comments.content_id', '=', 'games.id'); |
107 | 107 | $join->on('comments.content_type', '=', \DB::raw("'game'")); |
108 | 108 | }) |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ->select('id', 'title', 'short') |
137 | 137 | ->get(); |
138 | 138 | $gtypes = array(); |
139 | - foreach ($gametypes as $gt){ |
|
139 | + foreach ($gametypes as $gt) { |
|
140 | 140 | $t['title'] = $gt->title; |
141 | 141 | $t['short'] = $gt->short; |
142 | 142 | $gtypes[$gt->id] = $t; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | ]); |
151 | 151 | } |
152 | 152 | |
153 | - public function index($userid){ |
|
153 | + public function index($userid) { |
|
154 | 154 | $lists = \DB::table('user_lists') |
155 | 155 | ->where('user_id', '=', $userid) |
156 | 156 | ->select([ |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $list = \DB::table('user_lists') |
50 | 50 | ->where('id', '=', $listid) |
51 | 51 | ->delete(); |
52 | - }else{ |
|
52 | + } else{ |
|
53 | 53 | $list = \DB::table('user_lists') |
54 | 54 | ->where('id', '=', $listid) |
55 | 55 | ->where('user_id', '=', \Auth::id()) |
@@ -7,12 +7,12 @@ discard block |
||
7 | 7 | |
8 | 8 | class FaqController extends Controller |
9 | 9 | { |
10 | - public function index(){ |
|
10 | + public function index() { |
|
11 | 11 | $faq = \DB::table('faq') |
12 | 12 | ->get(); |
13 | 13 | |
14 | 14 | $res = array(); |
15 | - foreach ($faq as $f){ |
|
15 | + foreach ($faq as $f) { |
|
16 | 16 | $t['id'] = $f->id; |
17 | 17 | $t['cat'] = $f->cat; |
18 | 18 | $t['title'] = $f->title; |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | ]); |
27 | 27 | } |
28 | 28 | |
29 | - public function create(){ |
|
29 | + public function create() { |
|
30 | 30 | return view('faq.create'); |
31 | 31 | } |
32 | 32 | |
33 | - public function store(Request $request){ |
|
33 | + public function store(Request $request) { |
|
34 | 34 | $this->validate($request, [ |
35 | 35 | 'cat' => 'required', |
36 | 36 | 'title' => 'required', |