Show flash message according to request Hi,
I'm trying to display a flash message according by the request name.
This working only for the first and second variants, ('record')== 1 and ('registration')== 1.
Variant third and fourth ('record')== 0) not working
if($request->input('record')== 1) {
flash()->success( trans('web.events_record_wants_send'));
}elseif($request->input('registration')== 1){
flash()->success( trans('web.events_rezervation_already'));
}elseif($request->input('record')== 0){
flash()->success( trans('web.events_record_wants_unsend'));
}else{
flash()->success( trans('web.events_rezervation_unset'));
}
Thx for help.
gabriel
Check your logic
record registration
1 X web.events_record_wants_send
0 1 web.events_rezervation_already
no valid combination for this
0 X web.events_record_wants_unsend
? ? web.events_rezervation_unset
Work out the truth table and write the correct logic, testing both flags at the same time
eg `if( $request->input('record')==0 && $request->input('registration')==1)
Ideally improve your design so that this ugly mess is not needed
Sorry,
but I do not understand what you want to say to me.
Please sign in or create an account to participate in this conversation.