Blog

Vite HTTPS HMR Issue

User import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; export default defineConfig({ plugins: [ laravel({ input: ['resources/js/app.js', 'resources/js/app-backend.js'], refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), ], server: { host: '0.0.0.0', // Allows access from the Docker container port: 5173, // Port […]

Scroll event on resize

User jQuery(document).ready(function ($) { let lastScrollTop = 0; $(window).scroll(function () { const currentScroll = $(this).scrollTop(); const header1 = document.querySelector(".main-header"); // Replace with Header 1 class or ID const header2 = document.querySelector(".sticky-header"); // Replace with Header 2 class or ID if (currentScroll > lastScrollTop) { // alert($(this).scrollTop()); header1.style.display = "none"; header2.style.display = "flex"; header2.style.opacity = "1"; […]

Yarn run dev issue

User laravel vite vue ddev setup yarn run dev not working port 5173 Assistant It seems like you are facing an issue where `yarn run dev` isn't working in your Laravel + Vite + Vue.js setup with DDEV, particularly related to port 5173. Here's a step-by-step guide to help you resolve the issue: 1. **Check […]

Mixed Content Error Fix

User ddev laravel vue Mixed Content: The page at 'https://shareyourthoughts.ddev.site/' was loaded over HTTPS, but requested an insecure script 'http://0.0.0.0:5173/@vite/client'. This request has been blocked; the content must be served over HTTPS.Understand this errorAI shareyourthoughts.ddev.site/:1 Mixed Content: The page at 'https://shareyourthoughts.ddev.site/' was loaded over HTTPS, but requested an insecure script 'http://0.0.0.0:5173/resources/js/app.js'. This request has been […]

DB connection error fix

User IlluminateDatabaseQueryException SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for db failed: Name or service not known (Connection: mariadb, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'shareyourthoughts' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name) at vendor/laravel/framework/src/Illuminate/Database/Connection.php:825 821▕ $this->getName(), […]

Managing DBs in DDEV

User we have multiple ddev projects how to manage db Assistant To manage multiple databases in DDEV for different projects, you can leverage the following strategies to keep things organized: ### 1. **Configure Separate Databases for Each Project** Each DDEV project can have its own database. When you create a new project in DDEV, it […]

DDEV Laravel Project Setup

User http://127.0.0.1:32817/ Assistant From the uploaded image, it looks like you are working with a Laravel project running in a DDEV environment. The `ddev describe` command shows the details of your setup, including: 1. **Project Name**: `shareyourthoughts` 2. **URLs**: – Project URL: [https://shareyourthoughts.ddev.site](https://shareyourthoughts.ddev.site) – Docker-mapped ports for web (HTTP/HTTPS) and database (MariaDB). 3. **Services**: – […]

Create DB in DDEV

User create db ddev Assistant To create a database using **DDEV**, you don’t need to manually create it since DDEV automatically sets up a database for your project when you start the environment. However, you can access and manage the database as follows: ### 1. **Start Your DDEV Project** If you haven’t already started your […]

Increase WordPress Upload Limit

User increase upload limit wordpress Assistant To increase the upload limit in WordPress, you can use one of the following methods: — ### 1. **Update the `php.ini` File** If you have access to your server's `php.ini` file, update it with the following values: upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300 – **Steps:** 1. […]

Google Reviews API Access

User google reviews api Assistant Google doesn't provide a direct API for accessing Google Reviews from Google Maps. However, you can retrieve Google Reviews data for your business using the **Google Places API**, which is part of the Google Maps Platform. Here's an overview of how you can use the Places API to get reviews: […]