Code Duplication    Length = 9-12 lines in 3 locations

src/Http/Controllers/VueOpdController.php 3 locations

@@ 189-197 (lines=9) @@
186
     * @param  \Illuminate\Http\Request  $request
187
     * @return \Illuminate\Http\Response
188
     */
189
    public function show($id)
190
    {
191
        $vue_opd = $this->vue_opd->findOrFail($id);
192
193
        $response['vue_opd'] = $vue_opd;
194
        $response['loaded'] = true;
195
196
        return response()->json($response);
197
    }
198
199
    /**
200
     * Show the form for editing the specified resource.
@@ 205-213 (lines=9) @@
202
     * @param  \App\VueOpd  $vue_opd
203
     * @return \Illuminate\Http\Response
204
     */
205
    public function edit($id)
206
    {
207
        $vue_opd = $this->vue_opd->findOrFail($id);
208
209
        $response['vue_opd'] = $vue_opd;
210
        $response['loaded'] = true;
211
212
        return response()->json($response);
213
    }
214
215
    /**
216
     * Update the specified resource in storage.
@@ 267-278 (lines=12) @@
264
     * @param  \App\VueOpd  $vue_opd
265
     * @return \Illuminate\Http\Response
266
     */
267
    public function destroy($id)
268
    {
269
        $vue_opd = $this->vue_opd->findOrFail($id);
270
271
        if ($vue_opd->delete()) {
272
            $response['loaded'] = true;
273
        } else {
274
            $response['loaded'] = false;
275
        }
276
277
        return json_encode($response);
278
    }
279
}
280