src/Controllers/Auth/RegistrationController.php
public function postResend(Request $request)
    {
        // Validate the form data
        $result = $this->validate($request, [
            'email' => 'required|email|max:255'
        ]);

        // Fetch the user in question
        $user = Sentinel::findUserByCredentials(['email' => $request->get('email')]);

        // Only send them an email if they have a valid, inactive account
        if (!Activation::completed($user)) {
            // Generate a new code
            $activation = Activation::create($user);

            // Send the email
            $code = $activation->getCode();
            $email = $user->email;
            Mail::to($email)->queue(new CentaurWelcomeEmail($email, $code, 'Account Activation Instructions'));
        }

        $message = 'New instructions will be sent to that email address if it is associated with a inactive account.';

        if ($request->expectsJson()) {
            return response()->json(['message' => $message], 200);
        }

        Session::flash('success', $message);
        return redirect('/dashboard');
    }
public function postResend(Request $request)
    {
        // Validate the form data
        $result = $this->validate($request, [
            'email' => 'required|email|max:255'
        ]);

        // Fetch the user in question
        $user = Sentinel::findUserByCredentials(['email' => $request->get('email')]);

        // Only send them an email if they have a valid, inactive account
        if (!Activation::completed($user)) {
            // Generate a new code
            $activation = Activation::create($user);

            // Send the email
            $code = $activation->getCode();
            $email = $user->email;
            Mail::to($email)->queue(new CentaurWelcomeEmail($email, $code, 'Account Activation Instructions'));
        }

        $message = 'New instructions will be sent to that email address if it is associated with a inactive account.';

        if ($request->expectsJson()) {
            return response()->json(['message' => $message], 200);
        }

        Session::flash('success', $message);
        return redirect('/dashboard');
    }
public function postResend ( Request $ request ) { // Validate the form data $ result = $ this -> validate ( $ request , [ 'email' => 'required|email|max:255' ] ) ; // Fetch the user in question $ user = Sentinel :: findUserByCredentials ( [ 'email' => $ request -> get ( 'email' ) ] ) ; // Only send them an email if they have a valid, inactive account if ( ! Activation :: completed ( $ user ) ) { // Generate a new code $ activation = Activation :: create ( $ user ) ; // Send the email $ code = $ activation -> getCode ( ) ; $ email = $ user -> email ; Mail :: to ( $ email ) -> queue ( new CentaurWelcomeEmail ( $ email , $ code , 'Account Activation Instructions' ) ) ; } $ message = 'New instructions will be sent to that email address if it is associated with a inactive account.' ; if ( $ request -> expectsJson ( ) ) { return response ( ) -> json ( [ 'message' => $ message ] , 200 ) ; } Session :: flash ( 'success' , $ message ) ; return redirect ( '/dashboard' ) ; }
Handle a resend activation request
@return Response|Redirect
Handle a resend activation request