Skip to content

Instantly share code, notes, and snippets.

@yogithesymbian
Created February 10, 2025 05:34
Show Gist options
  • Save yogithesymbian/96a2965fa55ef6de9a30d69a9fcbfe92 to your computer and use it in GitHub Desktop.
Save yogithesymbian/96a2965fa55ef6de9a30d69a9fcbfe92 to your computer and use it in GitHub Desktop.
~/.zshr php config
laravel_pub() {
local IP=${1:-$(ipconfig getifaddr en0)} # Use argument if provided, otherwise get local IP
if [[ -z "$IP" ]]; then
echo "❌ Failed to determine IP address. Falling back to 127.0.0.1"
IP="127.0.0.1"
fi
echo "🚀 Starting Laravel on http://$IP:8000"
php artisan serve --host="$IP" --port=8000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment