Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Change the Logo in a Laravel Jetstream Application

I am new to Laravel and am trying to change the logo in a Laravel application with Jetstream and Inertia.

I have gone over the documentation as well as resources on Laracasts and understand that I need to update the svg (or can use a png/jpg etc by using the html img tag) in the following files:

  • application-logo.blade.php
  • authentication-card-logo.blade.php
  • application-mark.blade.php

The Logo is referenced in AppLayout.vue via a jet-application-mark element:

<div class="flex-shrink-0 flex items-center">
    <inertia-link :href="route('dashboard')">
        <jet-application-mark class="block h-9 w-auto" />
    </inertia-link>
</div>

As well as a jet-application-logo element in the Welcome.vue:

<div>
    <jet-application-logo class="block h-12 w-auto" />
</div> 

In each of the files listed above I replaced the svg with an html img to a resource:

<img src="{{ asset('images/enhanced-logo.png') }}" />

After changing the files above and rebuilding, the original Jetstream logo remains - the only place that it is working is in login.blade.php, the following code does pull in the image that I want:

<x-slot name="logo">
    <x-jet-authentication-card-logo />
</x-slot>

Any direction as to what I am doing wrong would be appreciated.

like image 611
Andrew Avatar asked Oct 29 '25 02:10

Andrew


1 Answers

To change logo in a Laravel Jetstream application:

The authentication views in a Jetstream application, regardless of the stack are simple blade views common for both stacks. To change the logo for authentication views edit resources/views/vendor/jetstream/components/authentication-card-logo.blade.php

<a href="/">
    //Replace the default svg with your own logo svg or an image
    <img src="custom/logo.png" />
</a>

Then depending upon the stack

Inertia stack

Replace the default logo with your own custom logo in

  • resources/js/Jetstream/ApplicationLogo.vue
  • resources/js/Jetstream/ApplicationMark.vue

with

<template>
    //Replace the default svg with your own logo svg or an image
    <img src="custom/logo.png" />
</template>

Livewire stack

Replace the default logo with your own custom logo in

  • resources/views/vendor/jetstream/components/application-logo.blade.php
  • resources/views/vendor/jetstream/components/application-mark.blade.php

with

//Replace the default svg with your own logo svg or an image
<img src="custom/logo.png" />
like image 102
Donkarnash Avatar answered Oct 30 '25 17:10

Donkarnash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!