PHPNews

Mentionable Usernames with TDD

For the next version of the Laracasts forum, we offer a small feature that provides @username autocompletion when writing a new reply. To populate this list of …

Written by Laracasts - - Aggregated on Friday September 21, 2018


Smaller Additions

Let's review a few smaller - yet still important - updates to Laravel 5.7. You'll learn about a new base directory for your JavaScript and CSS assets, …

Written by Laracasts - - Aggregated on Monday September 17, 2018


Count Up

Let's review another real-life example. We need to construct a Vue component that counts from 0 to a given number very quickly. However, this counting should …

Written by Laracasts - - Aggregated on Wednesday September 12, 2018


Dump Server

Laravel 5.7 includes an incredibly useful new php artisan dump-server command. Written by Marcel Pociot, this command provides a wrapper around Symfony's …

Written by Laracasts - - Aggregated on Friday September 7, 2018


Email Verification

First up, we have email verification support out of the box in Laravel 5.7. It's as simple as adding implements MustVerifyEmail to your User class. Seriously.

Written by Laracasts - - Aggregated on Tuesday September 4, 2018


Polymorphic Relations

We've made it to the scariest of Eloquent relations: polymorphic. Don't worry! As with most things, the word is scarier than the technique. A polymorphic …

Written by Laracasts - - Aggregated on Monday September 3, 2018


Has Many Through

While not nearly as common, the hasManyThrough relationship, when necessary, can prove to be incredibly useful. This relationship type allows you to perform …

Written by Laracasts - - Aggregated on Thursday August 30, 2018


Many to Many

Many to many relationships are a bit more confusing to understand. Let's break it down by reviewing the common "posts" and "tags" relationship. A one-to-one or …

Written by Laracasts - - Aggregated on Monday August 27, 2018


One to Many

Now that we have "one-to-one" relationships locked and loaded, let's move on to our next Eloquent relationship: "one-to-many." What might be an example of …

Written by Laracasts - - Aggregated on Thursday August 23, 2018


That's a Wrap

Take a moment to think how much we've covered in this series. These techniques can be applied to any new component or feature that you're working on. I hope …

Written by Laracasts - - Aggregated on Tuesday August 21, 2018


One to One

First up, we have "one to one" relationships. This is an easy one to picture in your head. What is one thing that a user might be associated with? What about a …

Written by Laracasts - - Aggregated on Monday August 20, 2018


Color Coding Achievements

At the moment, all achievements exist on the same playing field, which we designate using a blue background. Let's add the necessary logic to specify a …

Written by Laracasts - - Aggregated on Monday August 13, 2018


Custom Achievement Collections

In some situations, you may find it beneficial to return a custom collection class for your various Eloquent queries. No problem: overriding the newCollection …

Written by Laracasts - - Aggregated on Friday August 10, 2018


Achievement Caching

Did you notice that we have a pesky N+1 issue at the moment? Let's resolve it in this episode by caching all achievements forever. If at some point in the …

Written by Laracasts - - Aggregated on Thursday August 9, 2018