
Build a Laravel 11 book review app with authentication, user dashboards, CRUD for boxes, public toggle, and an Axios and Alpine.js powered search on home page, listing only public boxes.
Use composer to create a fresh Laravel project named my_box, cd into it, explore Laravel structure, and switch the database from sqlite to mysql on localhost:3306 using database name my_box.
Install the breeze starter kit for a Laravel 11 app, migrate the database, and set up flowbite with tailwind. Then run npm install, npm run dev, and start PHP server.
Create a book model with migrations, factory, and seeders in a Laravel 11 project, setting up title, summary, image URL, and user relationships with cascade delete.
List the current authenticated user's boxes with an index view and auth middleware route, paginate results, and show each box’s book image, title, and human-friendly created date.
Learn to create a new book entry in Laravel 11 by building a create book form, validating inputs, uploading images, and storing the record for a book review app.
Refactor image uploading by removing the image url attribute, enabling public storage with a symlink, and test the full image url via the model accessor and blade.
Implement the edit view for a book in a Laravel 11 app by wiring routes and controller, pre-filling title, summary, and image, and enforcing owner-only access with a 403 guard.
Implement update book logic in the controller with authorization, binding the book model, and validating title, summary, and image. Handle image uploads, save changes, and delete old images from storage.
Implement a delete image feature in a Laravel 11 book review app using axios to remove image endpoint and set the book image URL to null, with alpine.js controlling rendering.
Implement delete book with a confirmation and ensure the destroy method removes the book image from storage. Use axios delete with the book url and reload on 204 status.
Master Laravel 11 authorization by using a book policy to control update and delete actions, validating the current authenticated user against the book owner instead of inline controller checks.
Create a functional timeline in Laravel 11 for a book review app, displaying books uploaded by users with details, like interactions, and pagination.
Implement a show button to navigate from the timeline to book details in Laravel 11, passing the book to the show view via route binding.
Create a like model and migration, establish belongs to and has many relationships with books and users, enforce a unique (book_id, user_id) constraint, and migrate to test the feature.
Implement a toggle like feature for books by checking authentication, creating or removing likes with first or create, and updating the UI via Alpine and Axios.
Learn how to implement a real likes count in a Laravel 11 book review app, including authentication checks, toggling likes with Alpine, and formatting a pluralized likes count.
Implement a Laravel 11 search feature by adding a term input on welcome page, using Laravel Search package and a searchable trait on the book model to query by title.
Add a new is_public boolean column to the box table with default false, update the book model casts, and implement a checkbox to manage visibility in create and update flows.
Learn to list only public books by adding a public scope to the book model, conditionally display images if available, and enforce 404 for non-public books.
Add a search box in the user dashboard and wire it to the book controller’s index via a get request, filtering by the authenticated user’s id and the search term.
Learn to deploy a Laravel 11 book review app to Cloudways, configure PHP 8.2, deploy via Git, run Composer and Breeze, and optimize with Nginx and Redis.
Laravel 11: Beginner's Guide to Building a Book Review App
Welcome to "Laravel 11: Beginner's Guide to Building a Book Review App"! Are you ready to embark on a journey into the world of web development with Laravel, one of the most powerful and elegant PHP frameworks available today? Whether you're a complete beginner or someone with some programming experience looking to dive into Laravel, this course is designed to equip you with the knowledge and skills you need to build your very own book review application from scratch.
In this comprehensive course, we'll start by laying the foundation with Laravel 11, the latest version of this renowned framework, and guide you through each step of the development process. By the end of the course, you'll have a fully functional book review app that you can proudly showcase in your portfolio.
The course begins with an introduction to Laravel, where we'll explore its features, benefits, and why it's the preferred choice for building web applications. You'll learn how to set up your development environment, install Laravel, and create a new project. With our development environment ready, we'll dive straight into building our book review app.
One of the core functionalities of our app is user authentication. You'll learn how to implement secure user registration, login, and logout functionality using Laravel's built-in authentication system. We'll also explore how to customize the authentication process to suit the needs of our application.
With user authentication in place, we'll move on to building the backbone of our app: the ability to add, edit, view, and delete book reviews. You'll discover how to set up a MySQL database, create database migrations, and define eloquent models to interact with our database. We'll cover Laravel's powerful routing system, controllers, and views to create a seamless user experience.
But we won't stop there! We'll also implement features such as user roles and permissions to differentiate between regular users and administrators. You'll learn how to restrict access to certain parts of the application based on user roles and how to manage user permissions dynamically.
No web application is complete without proper validation and error handling. Throughout the course, you'll learn how to validate user input, handle form submissions, and gracefully handle errors to ensure a smooth user experience.
Additionally, we'll explore advanced topics such as pagination, search functionality, and RESTful API development to take your Laravel skills to the next level. By the end of the course, you'll not only have a fully functional book review app but also a solid understanding of Laravel's key concepts and best practices.
This course is designed for anyone who wants to learn Laravel from scratch and build real-world web applications. Whether you're a student, a freelancer looking to expand your skill set, or a developer aiming to level up your career, this course is for you. Join us on this exciting journey and unlock the potential of Laravel to bring your ideas to life!