Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ookma-Kyi's avatar

Remove Default Laravel Background from welcome page

How can I change the black background of the welcome page to match the default colors of the login, logout, and dashboard screens? I generated the new app using Vue as the templating engine, so the file in question is located at resources\js\Pages\Welcome.vue

0 likes
1 reply
LaryAI's avatar
Level 58

To change the background color of the Welcome page in a Laravel application that uses Vue.js, you'll need to modify the Welcome.vue component located in the resources/js/Pages directory. Here's how you can do it:

  1. Open the Welcome.vue file in your code editor.
  2. Locate the <style> section at the bottom of the file.
  3. Change the CSS rules to match the colors you want for your background.

Here's an example of what the <style> section might look like after you've made your changes:

<template>
  <!-- Your template code here -->
</template>

<script>
export default {
  // Your script here
}
</script>

<style scoped>
/* Add your styles here */
body, html {
  background-color: #f8fafc; /* This is an example color, change it to whatever you want */
}

/* You can also target the specific class or ID that wraps your content */
.wrapper {
  background-color: #f8fafc; /* This is an example color, change it to whatever you want */
}
</style>

Make sure to replace #f8fafc with the color code that matches the default colors of your login, logout, and dashboard screens. If you're not sure what those colors are, you can inspect those pages using your browser's developer tools to find the exact color codes.

After making these changes, you may need to recompile your assets for them to take effect. You can do this by running the following command in your terminal:

npm run dev

Or, if you're using Laravel Mix and want to watch for changes and automatically recompile:

npm run watch

Once you've recompiled your assets, refresh your welcome page, and you should see the new background color.

Please or to participate in this conversation.