PHPNews

Collections

Our first core concept is collection chaining. As you've surely learned by now, when fetching multiple records from a database, a Collection instance is …

Written by Laracasts - - Aggregated on Wednesday November 20, 2019


Password Reconfirmation

Sometimes, even if a user is currently signed in, you'll want them to re-confirm their password before proceeding with a given action. For example, updating a …

Written by Laracasts - - Aggregated on Saturday November 16, 2019


The Password Reset Flow

In this episode, we'll discuss the basic password reset flow. If a user forgets their password, a series of actions need to take place: they request a reset; …

Written by Laracasts - - Aggregated on Thursday November 14, 2019


Widget Workshop

Have you ever had a controller action that, over time, grows and grows as you declare and fetch all necessary data for each new section of the page? Very …

Written by Laracasts - - Aggregated on Thursday October 17, 2019


Basic Eloquent Relationships

Let's now switch back to Eloquent and begin discussing relationships. For example, if I have a $user instance, how might I fetch all projects that were created …

Written by Laracasts - - Aggregated on Tuesday October 15, 2019


Explain Laravel Macros

If you browse the Laravel codebase, you'll find countless references to a trait called Macroable. This trait allows you to extend the public interface of a …

Written by Laracasts - - Aggregated on Monday October 14, 2019


Consider Named Routes

Named routes allow you to translate a URI into a variable. This way, if a route changes at some point down the road, all of your links will automatically …

Written by Laracasts - - Aggregated on Thursday October 10, 2019


Reduce Duplication

Your next technique is to reduce duplication. If you review our currentArticlesController, we reference request keys in multiple places. Now as it turns out, …

Written by Laracasts - - Aggregated on Wednesday October 9, 2019


Leverage Route Model Binding

So far. we've been manually fetching a record from the database using a wildcard from the URI. However, Laravel can perform this query for us automatically, …

Written by Laracasts - - Aggregated on Tuesday October 8, 2019