public function sendActivationMail($user)
    {
        if( ! $this->shouldSend($user) ) {
            return trans('HCACL::users.activation.check_email');
        }

        \DB::beginTransaction();

        try {
            $token = $this->createActivation($user);

            $user->sendActivationLinkNotification($token);
        } catch ( \Exception $e ) {
            \DB::rollback();

            throw new \Exception('Activation code or mail sending failed');
        }

        \DB::commit();

        return trans('HCACL::users.activation.resent_activation');
    }
public function sendActivationMail($user)
    {
        if( ! $this->shouldSend($user) ) {
            return trans('HCACL::users.activation.check_email');
        }

        \DB::beginTransaction();

        try {
            $token = $this->createActivation($user);

            $user->sendActivationLinkNotification($token);
        } catch ( \Exception $e ) {
            \DB::rollback();

            throw new \Exception('Activation code or mail sending failed');
        }

        \DB::commit();

        return trans('HCACL::users.activation.resent_activation');
    }
public function sendActivationMail ( $ user ) { if ( ! $ this -> shouldSend ( $ user ) ) { return trans ( 'HCACL::users.activation.check_email' ) ; } \ DB :: beginTransaction ( ) ; try { $ token = $ this -> createActivation ( $ user ) ; $ user -> sendActivationLinkNotification ( $ token ) ; } catch ( \ Exception $ e ) { \ DB :: rollback ( ) ; throw new \ Exception ( 'Activation code or mail sending failed' ) ; } \ DB :: commit ( ) ; return trans ( 'HCACL::users.activation.resent_activation' ) ; }
Send activation mail

@param $user
@return array
@throws \Exception
Send activation mail