Friday, June 20, 2025

 

1. Register an App in Azure AD

  • Go to: https://portal.azure.com

  • Navigate to: Azure Active Directory > App registrations > New registration

  • if you don't find it goto "Microsoft Entra ID"

  • Once inside, select App Registrations --> New Registration

  • Give it a name (e.g. Laravel Email App)

  • Redirect URI: Can be http://localhost or your app callback

2. Add API Permissions - from right side manage-->choose api permissions

  • Under "API permissions" > search "mail" and Add:

    • Mail.Send (delegated)

    • User.Read

3. Create a Client Secret -From the app registration overview page

  • Under "Certificates & secrets" > "New client secret"

  • Copy the secret value

  • client id and tenant id

Steps to Generate App Password for example@domain.com to use in laravel app, if there is MFA

 

🛠️ Sign in at: https://mysignins.microsoft.com/security-info

  1. Use example@domain.com to log in

  2. Go to Security Info > Click Add method

  3. Select App password

  4. Name it (e.g., “Laravel SMTP”) and click Next

  5. Copy the generated password – you will not be able to see it again

  6. Update your Laravel .env:


Sunday, June 8, 2025

  Step-by-Step: Install Ubuntu Using WSL on Windows

Step 1: Enable WSL and Virtual Machine Platform

Open PowerShell as Administrator and run:

wsl --install

This will install WSL 2, the latest version with full Linux kernel support.

🔸 If WSL is already installed, make sure it's version 2:

wsl --set-default-version 2

Step 2: Install Ubuntu from Microsoft Store

  1. Open Microsoft Store.

  2. Search for "Ubuntu".

  3. Choose your version (e.g., Ubuntu 22.04 LTS).

  4. Click Install.


🔹 Step 3: Set Up Ubuntu

After install:

  1. Launch “Ubuntu” from Start menu.

  2. Wait for it to extract and initialize.

  3. Create a new UNIX username and password.


  4. Step 4: Install Development Tools in Ubuntu (optional)

  5. Inside the Ubuntu terminal:

  6. sudo apt update && sudo apt upgrade -y

    sudo apt install php mysql-server composer nodejs npm git curl unzip -y

  7. composer global require laravel/installer

You need to install the “Remote - WSL” extension inside Visual Studio Code, not from the terminal.

🔹 Step-by-Step to Fix:

  1. Open VS Code

  2. Go to the Extensions view:

    • Shortcut: Ctrl + Shift + X

    • Remote - WSL

    • After Installing:

      To open a WSL Ubuntu project:

      • Press F1 or Ctrl + Shift + P

      • Type:

      • WSL: Open Folder

      🔹 2. Generate SSH Key Pair

    • ssh-keygen -t ed25519 -C "your_email@example.com"

Tuesday, June 3, 2025

Git Setup on Windows

 

1. Install Git for Windows

  • Download and install from: https://git-scm.com/

  • During setup:

    • Choose “Git from the command line and also from 3rd-party software”

    • Choose recommended defaults unless you have special needs

✅ After install, open Git Bash or CMD and run:

git --version

2. Clone Your Laravel + Vue Project

cd C:\xampp\htdocs git clone https://github.com/your-username/your-laravel-vue-project.git cd your-laravel-vue-project

Or initialize a new repo:

git init

3. Set Git User Info (if not set globally)

git config user.name "Your Name"
git config user.email "you@example.com"

4. Typical Git Workflow (Basic Commands)

ActionCommand
Stage changes        git add .
Commit changesgit commit -m "Your message"
Push to remotegit push origin main
Pull latestgit pull origin main
Check statusgit status
Switch branchgit checkout branch-name

5. Optional Git GUI Tools for Windows

If you prefer visual tools:


✅ Laravel + Git Example Setup

In C:\xampp\htdocs\your-project:


composer install npm install cp .env.example .env php artisan key:generate git init git remote add origin https://github.com/your-username/your-repo.git git add . git commit -m "Initial commit" git push -u origin main