| @@ 101-111 (lines=11) @@ | ||
| 98 | * |
|
| 99 | * @return \Illuminate\Http\Response |
|
| 100 | */ |
|
| 101 | public function getBySekolah($id) |
|
| 102 | { |
|
| 103 | $prodi_sekolahs = $this->prodi_sekolah->where('sekolah_id', '=', $id)->with(['sekolah', 'program_keahlian', 'user'])->get(); |
|
| 104 | ||
| 105 | $response['prodi_sekolahs'] = $prodi_sekolahs; |
|
| 106 | $response['message'] = 'Success'; |
|
| 107 | $response['error'] = false; |
|
| 108 | $response['status'] = true; |
|
| 109 | ||
| 110 | return response()->json($response); |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * Show the form for creating a new resource. |
|
| @@ 211-221 (lines=11) @@ | ||
| 208 | * @param \App\ProdiSekolah $prodi_sekolah |
|
| 209 | * @return \Illuminate\Http\Response |
|
| 210 | */ |
|
| 211 | public function show($id) |
|
| 212 | { |
|
| 213 | $prodi_sekolah = $this->prodi_sekolah->with(['sekolah', 'program_keahlian', 'user'])->findOrFail($id); |
|
| 214 | ||
| 215 | $response['prodi_sekolah'] = $prodi_sekolah; |
|
| 216 | $response['error'] = false; |
|
| 217 | $response['message'] = 'Success'; |
|
| 218 | $response['status'] = true; |
|
| 219 | ||
| 220 | return response()->json($response); |
|
| 221 | } |
|
| 222 | ||
| 223 | /** |
|
| 224 | * Show the form for editing the specified resource. |
|
| @@ 76-86 (lines=11) @@ | ||
| 73 | * |
|
| 74 | * @return \Illuminate\Http\Response |
|
| 75 | */ |
|
| 76 | public function get() |
|
| 77 | { |
|
| 78 | $jenis_sekolahs = $this->jenis_sekolah->with('user')->get(); |
|
| 79 | ||
| 80 | $response['jenis_sekolahs'] = $jenis_sekolahs; |
|
| 81 | $response['error'] = false; |
|
| 82 | $response['message'] = 'Success'; |
|
| 83 | $response['status'] = true; |
|
| 84 | ||
| 85 | return response()->json($response); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Show the form for creating a new resource. |
|
| @@ 154-164 (lines=11) @@ | ||
| 151 | * @param \App\JenisSekolah $jenis_sekolah |
|
| 152 | * @return \Illuminate\Http\Response |
|
| 153 | */ |
|
| 154 | public function show($id) |
|
| 155 | { |
|
| 156 | $jenis_sekolah = $this->jenis_sekolah->with(['user'])->findOrFail($id); |
|
| 157 | ||
| 158 | $response['jenis_sekolah'] = $jenis_sekolah; |
|
| 159 | $response['error'] = false; |
|
| 160 | $response['message'] = 'Success'; |
|
| 161 | $response['status'] = true; |
|
| 162 | ||
| 163 | return response()->json($response); |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Show the form for editing the specified resource. |
|
| @@ 172-182 (lines=11) @@ | ||
| 169 | * @param \App\JenisSekolah $jenis_sekolah |
|
| 170 | * @return \Illuminate\Http\Response |
|
| 171 | */ |
|
| 172 | public function edit($id) |
|
| 173 | { |
|
| 174 | $jenis_sekolah = $this->jenis_sekolah->with(['user'])->findOrFail($id); |
|
| 175 | ||
| 176 | $response['jenis_sekolah'] = $jenis_sekolah; |
|
| 177 | $response['error'] = false; |
|
| 178 | $response['message'] = 'Success'; |
|
| 179 | $response['status'] = true; |
|
| 180 | ||
| 181 | return response()->json($response); |
|
| 182 | } |
|
| 183 | ||
| 184 | /** |
|
| 185 | * Update the specified resource in storage. |
|
| @@ 82-92 (lines=11) @@ | ||
| 79 | * |
|
| 80 | * @return \Illuminate\Http\Response |
|
| 81 | */ |
|
| 82 | public function get() |
|
| 83 | { |
|
| 84 | $admin_sekolahs = $this->admin_sekolah->with(['sekolah', 'user'])->get(); |
|
| 85 | ||
| 86 | $response['admin_sekolahs'] = $admin_sekolahs; |
|
| 87 | $response['error'] = false; |
|
| 88 | $response['message'] = 'Success'; |
|
| 89 | $response['status'] = true; |
|
| 90 | ||
| 91 | return response()->json($response); |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Display a listing of the resource. |
|
| @@ 99-109 (lines=11) @@ | ||
| 96 | * |
|
| 97 | * @return \Illuminate\Http\Response |
|
| 98 | */ |
|
| 99 | public function getBySekolah($id) |
|
| 100 | { |
|
| 101 | $admin_sekolahs = $this->admin_sekolah->where('sekolah_id', '=', $id)->with(['sekolah', 'user'])->get(); |
|
| 102 | ||
| 103 | $response['admin_sekolahs'] = $admin_sekolahs; |
|
| 104 | $response['message'] = 'Success'; |
|
| 105 | $response['error'] = false; |
|
| 106 | $response['status'] = true; |
|
| 107 | ||
| 108 | return response()->json($response); |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Show the form for creating a new resource. |
|
| @@ 198-208 (lines=11) @@ | ||
| 195 | * @param \App\ProdiSekolah $prodi_sekolah |
|
| 196 | * @return \Illuminate\Http\Response |
|
| 197 | */ |
|
| 198 | public function show($id) |
|
| 199 | { |
|
| 200 | $admin_sekolah = $this->admin_sekolah->with(['sekolah', 'admin_sekolah', 'user'])->findOrFail($id); |
|
| 201 | ||
| 202 | $response['admin_sekolah'] = $admin_sekolah; |
|
| 203 | $response['error'] = false; |
|
| 204 | $response['message'] = 'Success'; |
|
| 205 | $response['status'] = true; |
|
| 206 | ||
| 207 | return response()->json($response); |
|
| 208 | } |
|
| 209 | ||
| 210 | /** |
|
| 211 | * Show the form for editing the specified resource. |
|