Code Duplication    Length = 13-16 lines in 2 locations

app/Http/Controllers/GameFileController.php 1 location

@@ 94-109 (lines=16) @@
91
        return response()->download($filepath, $newfilename);
92
    }
93
94
    public function create($id)
95
    {
96
        $gamefiles = GamesFile::whereGameId($id)
97
            ->orderBy('release_year', 'desc')
98
            ->orderBy('release_month', 'desc')
99
            ->orderBy('release_day', 'desc')
100
            ->get();
101
        $game = Game::whereId($id)->first();
102
        $filetypes = GamesFilesType::get();
103
104
        return view('games.gamefiles', [
105
            'gamefiles' => $gamefiles,
106
            'game'      => $game,
107
            'filetypes' => $filetypes,
108
        ]);
109
    }
110
111
    public function store(Request $request, $id)
112
    {

app/Http/Controllers/UserListController.php 1 location

@@ 110-122 (lines=13) @@
107
        return \Redirect::action('GameController@show', $gameid);
108
    }
109
110
    public function show($userid, $listid)
111
    {
112
        $list = UserList::whereId($listid)->first();
113
        $arr = UserListItem::whereListId($listid)->pluck('content_id')->toArray();
114
        $games = Game::find($arr);
115
116
        return view('users.lists.show', [
117
            'list'      => $list,
118
            'games'     => $games,
119
            'orderby'   => '',
120
            'direction' => '',
121
        ]);
122
    }
123
124
    public function index($userid)
125
    {