addet laravel alias

This commit is contained in:
pika 2024-08-25 11:50:46 +02:00
parent 079f41f131
commit b9e3e45ba4

8
.zshrc
View file

@ -293,13 +293,17 @@ _coding_() {
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1 ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1
} }
if command_exists composer; then
alias laravel_new="composer create-project laravel/laravel"
fi
# Check if php is available, then create the alias # Check if php is available, then create the alias
if command -v php >/dev/null 2>&1; then if command_exists php; then
alias phprun="php artisan serve --host=$(get_ip) --port=8000" alias phprun="php artisan serve --host=$(get_ip) --port=8000"
fi fi
# Check if npm is available, then create the alias # Check if npm is available, then create the alias
if command -v npm >/dev/null 2>&1; then if command_exists npm; then
alias npmrun="npm run dev -- --host=$(get_ip) --port=8001" alias npmrun="npm run dev -- --host=$(get_ip) --port=8001"
fi fi
} }