Blog

Vite HMR Not Working

User import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import react from '@vitejs/plugin-react'; const port = 5175 const origin = `${process.env.DDEV_PRIMARY_URL}:${port}` export default defineConfig({ plugins: [ laravel({ input: 'resources/js/app.jsx', refresh: true, }), react(), ], server: { host: "0.0.0.0", port: port, strictPort: true, origin: origin, cors: { origin: `https://${process.env.DDEV_HOSTNAME}`, credentials: true, }, hmr: { […]

Multiple User Roles Laravel

User create multiple user role in laravel breeze react interia Assistant To create multiple user roles in a Laravel Breeze application using React and Inertia.js, follow these steps: ### Step 1: Set Up User Roles 1. **Create Roles Table:** Create a migration for the roles table. php artisan make:migration create_roles_table In the migration file, define […]

SSH Key Permission Issue

User neerajubuntu@BOOK-VKAD2MI9OH:/mnt/d/AWS-instance-projects$ ssh -i "openeratech.pem" ubuntu@ec2-51-20-60-238.eu-north-1.compute.amazonaws.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0555 for 'openeratech.pem' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "openeratech.pem": bad permissions ubuntu@ec2-51-20-60-238.eu-north-1.compute.amazonaws.com: Permission denied (publickey). Assistant The error message indicates […]

Laravel and WordPress DDEV Setup

User we have laravel in ddev now want to setup bedrock worpdress and like to set laravel as main site and wp as /wpbloh Assistant To set up a Laravel application as the main site and a Bedrock WordPress installation in a subdirectory (e.g., `/wpblog`) using DDEV, you can follow these steps: ### 1. **Set […]

CORS Configuration for Vite

User Access to script at 'https://openeratech.ddev.site:5175/resources/js/Pages/Welcome.jsx' from origin 'https://openeratech.ddev.site' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://openeratech.ddev.site:5175' that is not equal to the supplied origin. Assistant It looks like your Vite dev server (`5175`) is running separately from your main DDEV domain (`https://openeratech.ddev.site`), and the browser is blocking cross-origin requests […]

EC2 Instances for Medium Apps

User Which ec2 instance is good for medium scale applications Assistant For a **medium-scale application**, you need a balance of **CPU, memory, network performance, and scalability**. The right **EC2 instance type** depends on your application's specific needs (e.g., web app, database, API server). Here are some recommended instance types: ### **1. General Purpose (Balanced CPU […]

Set Excerpt Length WordPress

User set execerpt length wordpress Assistant To set the excerpt length in WordPress, you can use the `excerpt_length` filter in your theme's `functions.php` file. Here’s how you can do it: 1. **Open your theme's `functions.php` file.** You can find this file in your theme directory under `wp-content/themes/your-theme-name/functions.php`. 2. **Add the following code:** function custom_excerpt_length($length) { […]

Hover Effect Implementation

User Fahrzeugmarkt apply on hover/out using js and change background and image src fusion-column Assistant To implement a hover effect on the `.fusion-column` element that changes its background color and the image source, you can use JavaScript (or jQuery) to achieve this effect. Below is a simple example using plain JavaScript: ### HTML Structure <div […]

Bildwechsel bei Hover Effekt

User Fahrzeugmarkt apply on hover using js on fusion-column and change image src then on mouse out replace original Assistant You can achieve the hover effect using JavaScript by changing the image source when the mouse hovers over the `fusion-column` element and reverting it back to the original source when the mouse leaves. Here's a […]

SVG to Text Editor

User Convert above svg to put text editior Assistant I can extract the SVG code from your file and display it in a text editor for you to modify. Let me process the file now. Assistant I have extracted the SVG code. Now, I'll open it in a text editor so you can modify it […]