diff --git a/app/Http/Controllers/PeriodeController.php b/app/Http/Controllers/PeriodeController.php index 0fc6fde..91a7abb 100644 --- a/app/Http/Controllers/PeriodeController.php +++ b/app/Http/Controllers/PeriodeController.php @@ -49,7 +49,7 @@ class PeriodeController extends Controller $periode->is_active = 0; } - if($periode->save()){ + if(!$periode->save()){ return redirect()->route('periode.index')->with([ 'type' => 'success', 'msg' => 'Periode baru ditambahkan' diff --git a/resources/views/periode/index.blade.php b/resources/views/periode/index.blade.php index 1fb2966..87fb4fb 100644 --- a/resources/views/periode/index.blade.php +++ b/resources/views/periode/index.blade.php @@ -18,6 +18,11 @@ @if(session()->has('msg'))