Adding Game Reviews With Eloquent Relationships

Adding Game Reviews With Eloquent Relationships

Let’s keep building out our simple games application with Laravel. In this tutorial we will do a few things, in addition to adding the ability to add a review for any given game. First off though, we’ll need to clean up the main games listing view so it looks a little better. That may include tweaking the master layout page a bit as well. We’ll take a moment to discuss how relationships work in Laravel, create a new model and migration, update our models, and then test things out.…

How To Validate Form Submissions In Laravel

How To Validate Form Submissions In Laravel

Validating forms has become easier over time for web developers. In the early days, there were some really clunky approaches you had to implement to get some basic validation. Things are much easier these days however, and we’ll look at how to add simple validation to a form submission in Laravel. In our last tutorial, we got a pretty nice form set up to allow us to submit a new game to our games database.…

How To Set Up Form Submission In Laravel

How To Set Up Form Submission In Laravel

In our little games app, we don’t yet have a way to add new games to the database using the app itself. We are only able to insert new data by using the MySql console directly, or via phpMyAdmin. Let’s change that up and start looking at how we can add the ability to render a form so that we can submit new games. We’ll need a new route and controller method to display the form, as well as a new route and controller method to store the data into the database.…

Creating A Layouts Template In Laravel

Creating A Layouts Template In Laravel

It’s time to make things look a little more pretty than we have so far. So far, we have been simply outputting data to the web browser with no formatting or special CSS applied in any way. In fact, this is a good way to begin things, as it has allowed us to stay completely focused on the core concepts of Laravel. Soon however, your web designer side wants to contribute to the game to get things looking better.…

Route Model Binding In Laravel

Route Model Binding

What is Route Model Binding? I’m glad you asked! That is exactly what we’ll take a look at in this post. So far we’ve been experimenting with various features of the Laravel framework as we build out a simple application that allows us to keep track of games in a database. We’ve created two routes so far, and one of them accepts an id so that we can fetch a specific game from our database.…