dispatchIf & dispatchUnless a closure #52988
Answered
by
bayukartiko
bayukartiko
asked this question in
Ideas
-
I have read the documentation about Are laravel has same behaviour for
? I think that's great feature if we also have that. |
Beta Was this translation helpful? Give feedback.
Answered by
bayukartiko
Oct 12, 2024
Replies: 1 comment 1 reply
-
for temporary solution: $function = function () {
// ...
};
$condition = true;
if($condition){
dispatch($function);
}else{
$function();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bayukartiko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for temporary solution: