Code Duplication    Length = 11-11 lines in 3 locations

src/Http/Controllers/MasterSktmController.php 2 locations

@@ 79-89 (lines=11) @@
76
     *
77
     * @return \Illuminate\Http\Response
78
     */
79
    public function get()
80
    {
81
        $master_sktms = $this->master_sktm->with(['user'])->get();
82
83
        $response['master_sktms']   = $master_sktms;
84
        $response['error']          = false;
85
        $response['message']        = 'Success';
86
        $response['status']         = true;
87
88
        return response()->json($response);
89
    }
90
91
    /**
92
     * Show the form for creating a new resource.
@@ 181-191 (lines=11) @@
178
     * @param  \App\MasterSktm  $master_sktm
179
     * @return \Illuminate\Http\Response
180
     */
181
    public function show($id)
182
    {
183
        $master_sktm = $this->master_sktm->with(['user'])->findOrFail($id);
184
185
        $response['master_sktm']    = $master_sktm;
186
        $response['error']          = false;
187
        $response['message']        = 'Success';
188
        $response['status']         = true;
189
190
        return response()->json($response);
191
    }
192
193
    /**
194
     * Show the form for editing the specified resource.

src/Http/Controllers/SktmController.php 1 location

@@ 259-269 (lines=11) @@
256
     * @param  \App\Sktm  $nilai
257
     * @return \Illuminate\Http\Response
258
     */
259
    public function show($id)
260
    {
261
        $sktm = $this->sktm->with(['siswa', 'master_sktm', 'user'])->findOrFail($id);
262
263
        $response['sktm']       = $sktm;
264
        $response['error']      = false;
265
        $response['message']    = 'Success';
266
        $response['status']     = true;
267
268
        return response()->json($response);
269
    }
270
271
    /**
272
     * Show the form for editing the specified resource.