In this episode, we kick off the process of building a simple posts app to bring together everything we've learned so far about using Inertia with Laravel.
We start by cleaning up our routes to make way for our new posts functionality, then set up our development environment. Next, we generate a Post model with a migration, defining an anonymous 'body' field since we aren't worrying about user accounts just yet. After running the migration, we make sure the Post model is fillable for the 'body' attribute.
With the backend ready, we set up a posts controller that handles the main page for viewing posts. This involves wiring up a route and setting up a simple Inertia-powered view. We keep things tidy by creating a 'posts/index' Vue component, laying the groundwork for our interface.
To finish, we style the posts index page with some handy Tailwind classes, making it look neat and centered on the page. By the end of this episode, we’ve laid down the basic structure and are all set to start building out the form for actually creating posts in the next episode!