Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

netr's avatar
Level 10

Quick bash function to help start new projects

lnew() {
   laravel new $1
   cd $1
   composer require laravel/ui --dev
   php artisan ui vue --auth
   composer require laravel/telescope --dev
   composer require --dev barryvdh/laravel-ide-helper
   php artisan telescope:install
   git init
   git add .
   git commit -m "Install Laravel"
   npm install
   npm run dev
}

put it in your ~/.bashrc or ~/.bash_profile then run source ~/.bashrc

works like this: lnew name_of_project

it's just a boiler plate, works nice.. you can add as many packages and things as you want.

0 likes
2 replies
Snapey's avatar

Nice.

I had to change npm run install to npm install

then added

 git init
 git add .
 git commit -m Initial
 valet link $1
netr's avatar
Level 10

Hey. Good catch. I didn't notice the npm install fail when I posted it.

I like the git idea. Going to steal that one haha.

Please or to participate in this conversation.