Skip to content

Instantly share code, notes, and snippets.

View ridwanpr's full-sized avatar

Ridwan ridwanpr

View GitHub Profile
@ridwanpr
ridwanpr / Laravel S3 Multiple Bucket Storage
Created February 14, 2025 12:28
Laravel code example to handle s3 bucket rotation based on storage usage.
// Automatically manage bucket rotation based on storage usage.
// Each bucket has a 25GB limit, so the **BUCKET_THRESHOLD_GB** is set to 24GB to trigger a switch to a new bucket.
<?php
namespace App\Services;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
@ridwanpr
ridwanpr / reverb-instructions.md
Created January 9, 2025 05:39 — forked from mshoaibdev/reverb-instructions.md
Instructions for how to setup Laravel Reverb in Production.

Reverb Walkthrough

This is a walkthrough of how to configure Laravel Reverb for production using services like Laravel Forge or Ploi. The first step is nginx configuration changes, then .env changes and finally spinning up your Reverb server.

1. Configuring Nginx

Ensure your nginx site configuration has the following inside the server block:

 location /app {