In this episode, we kick things off by setting up a fresh Laravel project—perfect if you're starting from scratch or just want a refresher. If you've already got Laravel and Livewire ready, feel free to skip ahead!
We start by creating a new Laravel project (you can name it however you want), then pull in the Laravel Breeze starter kit. Breeze gives us handy authentication routes and a basic dashboard to experiment with. Once that's installed, we set up our database (the video shows Postgres, but you can use MySQL just fine), update our .env
credentials, and run the migrations to get everything ready.
Next, we launch both Laravel's backend (php artisan serve
) and the frontend with Vite (npm install
and npm run dev
). Once Breeze is installed, we register a user and get to our dashboard because that's where we’ll be building our Livewire component.
After a bit of cleanup in the dashboard view, we jump into installing Livewire via Composer and hook up the necessary scripts and styles in our layout. We publish the Livewire config so we can tweak file upload settings soon.
Now, it’s time to create our first Livewire component called uploader
. We move some markup into this component, so the dashboard stays clean, and you can already see everything hooked up in your browser. To give you a head start, the video shows pasting in pre-styled markup (grab it from the course files!). This markup includes the uploader area, an image, a file input, error validation, and even a progress bar for uploads.
By the end of the episode, our project is all set up. The uploader component’s basic layout is ready, so we can focus on handling and displaying uploaded files in the next part!