Eloquent and the Active Record Pattern
Let's now move on to Eloquent, which is Laravel's Active Record implementation. Eloquent allows us to map a database table record to a corresponding Eloquent object. In this episode, you'll learn the…
Let's now move on to Eloquent, which is Laravel's Active Record implementation. Eloquent allows us to map a database table record to a corresponding Eloquent object. In this episode, you'll learn the…
Again, let's be sure to write tests for this new votes count functionality.
We can finally work on the core functionality of voting for ideas. In this episode, we'll set up our database table to store votes on ideas, set up the relationship between our models, and display th…
Every application will require a certain amount of environment-specific configuration. Examples for this might be the name of the database you're connecting to, or which mail host and port your app…
Before we move on to the next chapter, on databases, let's make a couple tweaks to wrap up these last two sections. First, we'll remove the route constraint that is no longer required. Then, we'll co…
With the initial code implemented, let's fill it in with a test to prove that it works the way we expect.