add flash message

pull/1/head
Aji Kamaludin 6 years ago
parent 4e1cf65519
commit f3fb9fd45b
No known key found for this signature in database
GPG Key ID: 23E2BDC458317AF8

@ -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'

@ -18,6 +18,11 @@
</div>
@if(session()->has('msg'))
<div class="alert alert-{{ session()->get('type') }}" id="message" style="border-radius: 0px !important">
@if(session()->get('type') == 'success')
<i class="fe fe-check mr-2" aria-hidden="true"></i>
@else
<i class="fe fe-alert-triangle mr-2" aria-hidden="true"></i>
@endif
{{ session()->get('msg') }}
</div>
@endif

Loading…
Cancel
Save