Created
February 10, 2025 05:34
-
-
Save yogithesymbian/96a2965fa55ef6de9a30d69a9fcbfe92 to your computer and use it in GitHub Desktop.
Revisions
-
yogithesymbian created this gist
Feb 10, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ 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 }