Code Duplication    Length = 11-11 lines in 4 locations

src/Http/Controllers/MasterZonaController.php 2 locations

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

src/Http/Controllers/ZonaController.php 2 locations

@@ 117-127 (lines=11) @@
114
     *
115
     * @return \Illuminate\Http\Response
116
     */
117
    public function get()
118
    {
119
        $zonas = $this->zona->with(['siswa', 'sekolah', 'user'])->get();
120
121
        $response['zonas']      = $zonas;
122
        $response['error']      = false;
123
        $response['message']    = 'Success';
124
        $response['status']     = true;
125
126
        return response()->json($response);
127
    }
128
129
    /**
130
     * Show the form for creating a new resource.
@@ 278-288 (lines=11) @@
275
     * @param  \App\Zona  $zona
276
     * @return \Illuminate\Http\Response
277
     */
278
    public function show($id)
279
    {
280
        $zona = $this->zona->with(['siswa', 'sekolah', 'user'])->findOrFail($id);
281
282
        $response['zona']       = $zona;
283
        $response['error']      = false;
284
        $response['message']    = 'Success';
285
        $response['status']     = true;
286
287
        return response()->json($response);
288
    }
289
290
    /**
291
     * Show the form for editing the specified resource.