PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Logo link in transaction emails

Solved
produkt

May 2nd, 2025 07:09 PM

When my app sends transactional emails such as email verification, my logo appears at the top but the link points to '/'. How do I link it to my website?

jamesmaicle123

May 3rd, 2025 07:57 AM

When my app sends transactional emails like verification emails, the logo appears correctly at the top, but it links to the root path (/) instead of my actual website. To fix this, I edited the email template and updated the link around the logo. Originally, the logo was wrapped in an anchor tag pointing to /, which caused the redirection issue. I changed the href attribute to my full website URL (e.g., https://mywebsite.com) so that now, when users click on the logo in the email, they’re taken directly to my homepage. If you’re using an email service provider like SendGrid or Mailgun, you can usually update this in their template editor. Always test after making changes to ensure everything works as expected.

produkt

May 3rd, 2025 08:10 AM

Where is the email template found? Which file?

And how would you update this in sendgrid or mailgun if the template is being generated from Laravel itself? These templates don’t appear there, they are just used for sending through the SMTP server, no?

This kind of sounds like an AI generated answer that doesn’t actually address the specifics of the question.

bobbyiliev

May 4th, 2025 09:39 PM

Hey!

I think that it is just picked up from the APP_URL env var:

  1. Set APP_URL in your .env file to your website URL, like:

    APP_URL=https://yourdomain.com
    
  2. Then run:

    php artisan config:clear
    

This will update the logo link in all system emails.

If you want full control, you can publish the mail templates with:

php artisan vendor:publish --tag=laravel-mail

And edit the logo link in resources/views/vendor/mail/html/header.blade.php or modify the mail templates as you need.

- Bobby

produkt

May 5th, 2025 10:12 AM

My APP_URL was already set to my website URL. I ran php artisan config:clear and tried to resend a transaction email. The link was still blank. I then ran php artisan vendor:publish --tag=laravel-mail and opened resources/views/vendor/mail/html/header.blade.php and it only contains this:

<x-auth::elements.logo
    :height="config('devdojo.auth.appearance.logo.height')"
    :isImage="(config('devdojo.auth.appearance.logo.type') == 'image')"
    :imageSrc="config('devdojo.auth.appearance.logo.image_src')"
    :svgString="config('devdojo.auth.appearance.logo.svg_string')"
/>

I don't see anywhere to edit the logo link.

produkt

May 5th, 2025 11:40 AM

This is the content of vendor/devdojo/auth/resources/views/components/elements/logo.blade.php:

<a href="/" style="height:{{ $height ?? '30' }}px; width:auto; display:block" aria-label="{{ config('app.name') }} Logo">
    @if($isImage)
        <img src="{{ url($imageSrc) }}" style="height:100%; width:auto" alt="" />
    @else
        {!! str_replace('<svg', '<svg style="height:100%; width:auto"', $svgString) !!}
    @endif
</a>

Certainly this is the cause of the issue. I'd prefer not to modify vendor files, so perhaps the appropriate changes can be implemented in the auth package?

bobbyiliev

May 7th, 2025 06:10 AM

Best Answer

Good point. I've submitted a PR for this:

https://github.com/thedevdojo/auth/pull/157

Also, the auth package is open source, so if there's ever something you'd like to tweak or improve, you're more than welcome to submit a PR too!

Report
1