Starting a new Laravel app is easy and fast. You can do it just by running a couple of commands.
Notes:
- Choose sail services based on requirement
- I am using Larastarters. It's a Laravel Starter Kit with option to choose from a handful of Tailwind and Bootstrap themes.
curl -s "https://laravel.build/ProjectName?with=mysql,redis,mailpit" | bash
cd ProjectName
# Setting 8009 port. Feel free to change
sed -i '1s/^/APP_PORT=8009 3\n/' .env
# If you're on MacOS, run the following instead
# sed -i '' '1s/^/APP_PORT=8009 3\n/' .env
./vendor/bin/sail up -d
./vendor/bin/sail composer require laraveldaily/larastarters --dev
./vendor/bin/sail artisan larastarters:install
./vendor/bin/sail artisan migrate
# Your app is running...
See your brand new project running at http://localhost:8009.
To login to the new application, you'll need a user. You can use tinker tool to quickly add a new user in Laravel.
./vendor/bin/sail artisan tinker
# Run the following line with your choice of name, email and passowrd.
DB::table('users')->insert(['name'=>'admin','email'=>'admin@example.com','password'=> Hash::make('123123')])
exit