This is my code:
if(
$form->user_mail_address && $form->model()->user_mail_address == $form->user_mail_address &&
$form->user_nickname && $form->model()->user_nickname == $form->user_nickname &&
$form->user_sex && $form->model()->user_sex == $form->user_sex &&
$form->user_area && $form->model()->user_area == $form->user_area &&
$form->user_generation && $form->model()->user_generation == $form->user_generation &&
$form->status == Post::STATUS_APPROVED) {
Mail::send(new DepositMail($form->model()->id, $form->model()->user_mail_address));
Mail::send(new DepositMail($form->model()->id));}
As here I am trying when admin only change the status will send a mail to user email. But I think it's way too long. Will it have other method that will not need to use that long method to send the mail when only admin change the user status? Thank you.