Code Duplication    Length = 12-12 lines in 2 locations

src/Http/Controllers/MasterPrestasiController.php 1 location

@@ 167-178 (lines=12) @@
164
     * @return \Illuminate\Http\Response
165
     */
166
167
    public function edit($id)
168
    {
169
        $master_prestasi = $this->master_prestasi->findOrFail($id);
170
171
        array_set($master_prestasi->user, 'label', $master_prestasi->user->name);
172
173
        $response['master_prestasi'] = $master_prestasi;
174
        $response['user'] = $master_prestasi->user;
175
        $response['status'] = true;
176
177
        return response()->json($response);
178
    }
179
180
    /**
181
     * Update the specified resource in storage.

src/Http/Controllers/PrestasiController.php 1 location

@@ 164-175 (lines=12) @@
161
     * @return \Illuminate\Http\Response
162
     */
163
164
    public function edit($id)
165
    {
166
        $prestasi = $this->prestasi->findOrFail($id);
167
168
        array_set($prestasi->user, 'label', $prestasi->user->name);
169
170
        $response['prestasi'] = $prestasi;
171
        $response['user'] = $prestasi->user;
172
        $response['status'] = true;
173
174
        return response()->json($response);
175
    }
176
177
    /**
178
     * Update the specified resource in storage.