JeffreyWay

JeffreyWay

Member Since 5 Years Ago

Chattanooga, TN

Owner at Laracasts

Experience Points 470,830
Experience Level 50

0 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 299
Lessons
Completed
Best Reply Awards 349
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

13 Sep
2 days ago

JeffreyWay commented on Parsing Markdown

Taylor Otwell follows a convention for comments. Three lines total. Each new line contains three fewer characters than the one before it. Make for a pretty comment block. But in that 4:42 case, the convention wasn't followed precisely. No big deal. I was only being silly.

11 Sep
4 days ago

JeffreyWay commented on Reflect Into Functions

Heads up, if you want to play around with PHP generators, you could alternatively do this:

public function test_load_users()
{
    $this->load(function (User $user, User $user2) {
        dump($user);
    });
}

protected function load($callback)
{
    $users = LazyCollection::make(function () use ($callback) {
        $usersRequired = (new ReflectionFunction($callback))
                            ->getNumberOfParameters();

        for ($i = 1; $i <= $usersRequired; $i++) {
            yield new User;
        }
    });

    $callback(...$users);
}
10 Sep
5 days ago

JeffreyWay commented on At A Glance

That's the plan. 👍

JeffreyWay commented on At A Glance

It's an example you don't have to think about.

07 Sep
1 week ago

JeffreyWay commented on Lazy Collections

@foremostdigital Because ->first() is called on the LazyCollection instance. It's not part of the query builder.

06 Sep
1 week ago

JeffreyWay left a reply on Laracast Comments Bugs

@snapey Ah good catch. Fixing it right now.

JeffreyWay left a reply on Laracast Comments Bugs

however the orginal bug with editing threads still parsists.

That was fixed too.

JeffreyWay left a reply on Laracast Comments Bugs

@drwhat -

Bug 2 is fixed. That was a weird Vue issue where it wasn't picking up the Tribute autocomplete change.

The update comment box not going away was a small bug from a deploy earlier today. Should be fixed.

JeffreyWay left a reply on The Best Way To Build A Table Of Files For A Variety Of Models

If I understand you correctly, the answer is don't. Each Eloquent model should/will have its own table.

JeffreyWay commented on Frontend Scaffolding Has Been Moved To Laravel UI

It was redundant since Axios already attaches the appropriate header. More info here:

https://github.com/laravel/laravel/pull/5083

05 Sep
1 week ago

JeffreyWay left a reply on Npm Run Watch Issues

That's fine. ^4.0.7 will include 4.1.4.

JeffreyWay left a reply on Npm Run Watch Issues

This was fixed earlier today. Can you ensure that you have the latest version of Mix installed? It should be 4.1.4.

04 Sep
1 week ago

JeffreyWay commented on Lazy Collections

Absolutely.

03 Sep
1 week ago

JeffreyWay commented on Lazy Collections

Just hit the enter key to make a new line.

JeffreyWay commented on Lazy Collections

Yeah, thought that was a little strange too. For this video, I was still on the dev build of Laravel 6. The next episode covers Ignition, which will use the latest build.

JeffreyWay left a reply on Non-profit Pricing

Please use the contact support form instead for questions like this.

https://laracasts.com/contact

30 Aug
2 weeks ago

JeffreyWay commented on Explain Real-Time Facades From The Inside-Out

Ah yes of course you're right about the $accessor variable.

28 Aug
2 weeks ago

JeffreyWay commented on Determine The Average Rentals Per Day

Likely a mix of indexing and caching.

JeffreyWay commented on Authorization Essentials

Have a look at this video. I answer your question directly: https://laracasts.com/series/laravel-explained/episodes/1

JeffreyWay left a reply on Laravel 5.7 From Scratch Episode 27 - Not Working

Okay I figured out why this was sporadically happening. All fixed now.

27 Aug
2 weeks ago

JeffreyWay commented on Fetch The Most Popular Authors

Here's the query we wrote in this episode:

select users.id, users.name, count(*) as readers 
from users
left join post_reads 
on post_reads.post_id in (
    select id from posts where user_id = users.id
)
group by users.id
order by readers desc
limit 10

JeffreyWay commented on Authorization Essentials

\Gate means i should find a class called Gate at the root directory of my app, but there is none

No, it means to look for Gate in the global namespace.

Also, we are not importing the Gate class at the top of the file; i.e. there is no use \Path\to\Gate so why it still works

That's because of the backslash at the beginning: \Gate. This means to begin at the global namespace root. Without the backslash, PHP would look for the class within the namespace of the current file.

26 Aug
2 weeks ago

JeffreyWay commented on Test-Driving Threads

If you're working on a small website, then, sure, do that. Otherwise, without tests you're going to be refreshing the browser 800 times for every little change.

23 Aug
3 weeks ago

JeffreyWay commented on Reduce A Query From 12 Seconds To 1 Millisecond

You definitely don't want to do that. We'll talk more about this in future episodes, but an index can reduce write times (inserts and updates) considerably.

19 Aug
3 weeks ago
18 Aug
4 weeks ago

JeffreyWay commented on One-to-Many

Thanks, everyone!

JeffreyWay left a reply on Noob Here

I agree. Ditch it if you can and write your forms manually.

16 Aug
4 weeks ago

JeffreyWay left a reply on Updating DOM After AJAX Inserts Updated Element

If I understand you correctly, it's because the event handlers are no longer attached after you update the DOM. Event delegation is the solution.

https://learn.jquery.com/events/event-delegation/#event-propagation

JeffreyWay left a reply on Updating DOM After AJAX Inserts Updated Element

I'm not sure what you mean. If it correctly updates the #myDiv element, then the DOM has been updated.

JeffreyWay left a reply on How Edit A Reply Fills Markdown In Laracasts Forum Model

@erikverbeek is correct. The Markdown conversion is done on the server-side. I use the CommonMark Composer package.

JeffreyWay left a reply on Node_modules Folder

Sure. You can always generate it again when/if you need to.

15 Aug
1 month ago

JeffreyWay left a reply on OOP Bootcamp - Lesson 5

The constructor method on your Staff class is protected. That's why you're seeing that error. Change it to:

public function __construct($members = [])
{
    $this->members = $members;
}
13 Aug
1 month ago

JeffreyWay commented on Filtering Aggregated Data

Here's the final SQL query from this episode:

select title, sum(amount) sales, count(*) rentals 
from rental
join payment 
on payment.rental_id = rental.rental_id
join inventory
on inventory.inventory_id = rental.inventory_id
join film 
on film.film_id = inventory.film_id
group by film.film_id
having sales > 200
order by sales desc
09 Aug
1 month ago

JeffreyWay commented on Multiple Joins In One Query

Yes, views will be covered later in the series.

JeffreyWay commented on Core Concepts: Service Container And Auto-Resolution

It's a cornerstone of building apps in Laravel. You 100% need to know it.

08 Aug
1 month ago

JeffreyWay commented on The Strategy And Factory Patterns

At some point, you must write logic to decide which strategy to use. The key is to bubble up that logic as high as you can go. You can even move it to a dedicated factory class. Then, if you do have a new strategy, you simply update the factory class and you're good to go.

06 Aug
1 month ago

JeffreyWay commented on The Example MySQL Database

I think TablePlus is excellent, too. For the Sequel Pro issues, try pulling in the nightly builds.

https://sequelpro.com/nightly

05 Aug
1 month ago

JeffreyWay commented on You May Only View Your Projects

As you noted, Laravel recently introduced a change to make the primary key for all new table migrations a type of BIGINT. This means every foreign key you create should also have a type of BIGINT.

$table->unsignedBigInteger('post_id');

JeffreyWay commented on The Skeleton

You can use whatever you want. Yarn offered significant performance improvements at the time, which is why so many people switched over. That's not so much the case anymore. NPM is great.

03 Aug
1 month ago

JeffreyWay commented on Foreign Key Constraints

Nah - they're the perfect examples that anyone can instantly understand.

02 Aug
1 month ago

JeffreyWay left a reply on [Laracasts.com] Notifications Aren't Working

Should be fixed now. Thanks.

31 Jul
1 month ago

JeffreyWay commented on Workshop - FAQs

Subscribers don't see ads. Only guests.

29 Jul
1 month ago

JeffreyWay left a reply on Laracasts "Browse"

No design change. I only changed the nav link from Browse to Search. If you want the newest episodes first, either click "Episode" in the sidebar, or choose the "What's New" link under your avatar in the top right.

27 Jul
1 month ago

JeffreyWay left a reply on Upgrading From Yearly To Lifetime

@omario169 Send a quick support request and I'll set you up. http://laracasts.com/support

24 Jul
1 month ago

JeffreyWay left a reply on Print Tutorial

I don't do anything special for that. At the bottom of the page, I have:

<script>
    window.print();
</script>
23 Jul
1 month ago

JeffreyWay commented on An Alternative To Magic Numbers

Yes. You're assigning a name to an important number in your system.

JeffreyWay left a reply on Laravel Mix Extremly Slow

@adrianwix Yeah, something odd is going on there. When using npm run watch on the Laracasts codebase, everything recompiles within a second or two. Can you, one by one, comment out each call in your webpack.mix.js file to pinpoint where the hangup is?

JeffreyWay commented on Tabs

Yep, I have that on my list for this series. :)

JeffreyWay commented on Tabs

It would return the first child that has the active prop set to true.