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.
@@ 279-289 (lines=11) @@
276
     * @param  \App\Zona  $zona
277
     * @return \Illuminate\Http\Response
278
     */
279
    public function show($id)
280
    {
281
        $zona = $this->zona->with(['siswa', 'sekolah', 'user'])->findOrFail($id);
282
283
        $response['zona']       = $zona;
284
        $response['error']      = false;
285
        $response['message']    = 'Success';
286
        $response['status']     = true;
287
288
        return response()->json($response);
289
    }
290
291
    /**
292
     * Show the form for editing the specified resource.