Quick setup Laravel (with Tailwind scaffold)
I often install a fresh Laravel app to test a new package or replicate the setup for a tutorial. This is the fastest way to get a vanilla Laravel with Auth and Tailwind. The first step is only required if you have not installed the Laravel installer before ($ means that you have to enter that to your terminal):
- (
$ composer global require laravel/installer) $ laravel new project$ cd project && code .(opens in VSCode)- Open
.env - Change
DB_CONNECTION=mysqltoDB_CONNECTION=sqlite - Remove all lines not needed for SQLite:
DB_HOST,DB_PORT,DB_DATABASE,DB_USERNAMEandDB_PASSWORD $ touch database/database.sqliteto create the SQLite database$ composer require laravel-frontend-presets/tailwindcss --dev$ php artisan ui tailwindcss --authto scaffold Tailwind frontend$ npm install && npm run devto install the frontend$ php artisan migrateto migrate the database$ valet openor$ php artisan serveto open the site

Source: https://twitter.com/Martin_Betz/status/1256610649716723716
P.S. If you want to automate the installation and add Git and some more, you might find Tighten Co's Lambo useful.
Last Update: 2021-05-02