There is a newly available frontend preset for Laravel that can get you up-and-running quickly with the TALL stack. If you’re not familiar with the name, it’s an acronym that describes the main technologies involved in the stack:
This preset takes all of the pain of setting up a new application out of the way by providing some well-thought-out boilerplate. Here are some notable features:
- Frontend assets like TailwindCSS and AlpineJS are set up with Laravel Mix
- Tailwind UI and Tailwind’s Custom Forms extensions are available out-of-the-box
- Views extend a default layout
To install the preset in a fresh Laravel application:
composer require livewire/livewire laravel-frontend-presets/tall php artisan ui tall npm install npm run dev
If you want authentication in your application, make sure to use the
--auth flag on the preset command to get all the relevant routes, controllers, components and views:
composer require livewire/livewire laravel-frontend-presets/tall php artisan ui tall --auth npm install npm run dev
There are some notable things about the authentication scaffolding, too:
- Most of the auth scaffolding comes as Livewire components
- The parts that can’t be components are set up as single-action controllers
- The auth components come with full tests
All routes, components, controllers, and tests are published to your application. The idea behind this is that you can then take full control over every aspect of the scaffolding in your own app and not need to dig around in the vendor folder to figure out how things are working.
If you’re keen to get started on a new project with these technologies, check out the preset’s readme for installation instructions and more information.