Posts

Showing posts from April, 2025

JavaScript Password Strength Checker

JavaScript Password Strength Checker  document.addEventListener("DOMContentLoaded", function () {     const passwordInput = document.getElementById("password");     const strengthContainer = document.getElementById("oneid-password-strength-container");     passwordInput.addEventListener("input", function () {         const strength = checkPasswordStrength(passwordInput.value);         strengthContainer.textContent = `Strength: ${strength}`;         updateStrengthColor(strengthContainer, strength);     });     function checkPasswordStrength(password) {         let strength = 0;         if (password.length >= 8) strength++;         if (/[A-Z]/.test(password)) strength++;     ...

Hosting a Laravel 11 project on cPanel shared hosting

  Hosting a Laravel 11 project on cPanel shared hosting involves several steps since Laravel is built to work with a virtual host setup (like localhost with public/ as root), but cPanel typically uses public_html/ as the root directory. Here’s a full guide to help you: ✅ Prerequisites Laravel 11 project ready on your local machine. cPanel access (via your hosting provider). PHP version on server must be PHP 8.2+ . Composer installed on server (optional but helpful). MySQL database (if needed) created in cPanel. 📁 Step-by-Step Hosting Guide 1. Structure Your Project for cPanel By default, Laravel uses public/ as the web root. But cPanel uses public_html/ . So you need to move the contents of Laravel's public/ folder into public_html/ , and update paths accordingly. Let’s say your project folder is called laravel11app . Option A: Simple Adjustment (Recommended for shared hosting) Compress your entire Laravel project , excluding the vendor folder (optiona...