Fixed conflict between components

This commit is contained in:
Gregorio Chiko Putra
2019-05-16 13:47:48 +07:00
parent c4b05cb525
commit ac77c45f30
5 changed files with 115 additions and 94 deletions

View File

@@ -47,8 +47,11 @@ class SiswaController extends Controller
$siswa = Siswa::where('nisn', $request->nisn)
->where('tanggal_lahir', $tanggalLahir)
->with($request->with)
->first();
if ($request->with !== null)
$siswa = $siswa->with($request->with);
$siswa = $siswa->first();
/*
* Redirect with error if not found