Applying RESTful Methods to the Reviews Resource

Applying RESTful Methods to the Reviews Resource

When we talk about a resource with regard to the RESTful approach to development, we are making use of generic overviews of how to manage a collection of similar items. So far we have really focused on Games as our main resource in our little application. If we want to show all games, we use the index() method. If we want to display a form to insert a new game into the system, we use the create() method.…

A User hasMany Games and also hasMany Reviews

Users Can Add Games and Reviews

When we first started out creating our little games app, we set up a form to add games to the system. We also set up a form to add reviews for games in the system. We were able to establish the relationships between games and reviews. This was all done as a strictly guest based system as we had no user authentication system until just recently.…

How To Create User Registration in Laravel

How To Create User Registration in Laravel

In this tutorial, we are going to hand build a user registration system in Laravel. To be fair, we could actually make use of the php artisan make:auth command to scaffold basic login and registration views and routes automatically for us. This works great, but in the spirit of learning, we should know how to do this on our own. By building an example of user registration and session management from scratch, we will gain a much better idea of how to maintain and adjust these features as we need to moving forward.…

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.…