From b9e3e45ba40809af4eeb98e824cf268fc08f9608 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 25 Aug 2024 11:50:46 +0200 Subject: [PATCH] addet laravel alias --- .zshrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index a36bcdb..c23dd43 100644 --- a/.zshrc +++ b/.zshrc @@ -293,13 +293,17 @@ _coding_() { 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 - if command -v php >/dev/null 2>&1; then + if command_exists php; then alias phprun="php artisan serve --host=$(get_ip) --port=8000" fi # 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" fi }