Skip to content

Instantly share code, notes, and snippets.

View bhaidar's full-sized avatar

Bilal Haidar bhaidar

View GitHub Profile
@bhaidar
bhaidar / laravel-13-scaffolding-guide.md
Created March 30, 2026 21:22
Laravel 13 Project Scaffolding Guide - Complete setup with Vue 3, Inertia.js v3, Tailwind CSS v4, TypeScript, Sail, and modern dev tools

Laravel 13 Project Scaffolding Guide

This guide provides a comprehensive setup for a modern Laravel 13 application with the latest stack technologies.

Core Stack Components

The setup includes:

Backend: Laravel 13 running on PHP 8.5 via Docker containers, with Laravel Breeze providing Vue 3, Inertia.js v3, and TypeScript support.

@bhaidar
bhaidar / generate-inertia-docs.md
Created March 6, 2026 08:32
Claude Code slash command + Python script to generate Inertia.js docs as Word (.docx) and PDF. Usage: /generate-inertia-docs <version>
name generate-inertia-docs
description Generate Inertia.js documentation as Word and PDF
allowed-tools Bash

Generate Inertia.js Documentation

Generate Word (.docx) and PDF documentation for the specified Inertia.js version.

@bhaidar
bhaidar / new-laravel-project.md
Created March 5, 2026 12:24
Scaffold a new Laravel 12 project with Vue 3, Inertia.js, TypeScript, Sail, and common packages
description Scaffold a new Laravel 12 project with Vue 3, Inertia.js, TypeScript, Sail, and common packages
arguments
name description
project_name
Name of the new Laravel project (e.g. MyApp)
name description
parent_dir
Parent directory where the project folder will be created (e.g. ~/projects)

Create a new Laravel 12 project named $ARGUMENTS.project_name inside $ARGUMENTS.parent_dir.

@bhaidar
bhaidar / CLAUDE.md
Last active September 23, 2025 20:56
Laravel Boost: CLAUDE.md updated with Laravel Sail commands
=== foundation rules ===

Laravel Boost Guidelines

The Laravel Boost guidelines are specifically curated by Laravel maintainers for this application. These guidelines should be followed closely to enhance the user's satisfaction building Laravel applications.

Foundational Context

This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.

@bhaidar
bhaidar / php-pools.md
Created September 25, 2024 05:44 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
Here is a quick way to add authentication logging to Laravel.
1. Modify app/Providers/EventServiceProvider.php and add lines 16 through 32 of the example file in this GIST.
2. Create a new file app/Listeners/LogActivity.php and copy the contents of the file below into that file.
3. Enjoy logging.
@bhaidar
bhaidar / google-recaptcha.md
Created December 15, 2023 20:30 — forked from babacarcissedia/google-recaptcha.md
Add google recaptcha to website

Opinionated code Laravel code for adding recaptcha on website. Bot protection especially on open form with user authentication.

  1. Create blade component for ease of reuse
resources/views/components/input/captcha.blade.php

@props([
    'id',
    'name',
@bhaidar
bhaidar / .eslintrc.js
Created December 5, 2023 15:35 — forked from onlime/.eslintrc.js
ESLint/Prettier config for Vue 3 in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier'
@bhaidar
bhaidar / print.css
Created October 26, 2023 19:04 — forked from anonymous/print.css
/**
* Print Stylesheet fuer Deinewebsite.de
* @version 1.0
* @lastmodified 16.06.2016
*/
@media print {
/* Inhaltsbreite setzen, Floats und Margins aufheben */
/* Achtung: Die Klassen und IDs variieren von Theme zu Theme. Hier also eigene Klassen setzen */
@bhaidar
bhaidar / AppServiceProvider.php
Created October 3, 2023 07:23
Laravel macro to split a name into a first_name and last_name
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void