ngocphamm

ngocphamm

Member Since 4 Years Ago

Experience Points 8,725
Experience Level 2

1,275 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 198
Lessons
Completed
Best Reply Awards 0
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.

26 Jul
3 years ago

ngocphamm left a reply on 's' For Searching Site-wide Doesn't Work For Second Stroke

Okay that's fine Jeffrey. I just thought it could be a bug and report it :)

ngocphamm left a reply on 's' For Searching Site-wide Doesn't Work For Second Stroke

@Ruffles Yeah it does have focus, as the first hit of "s" works just fine.

ngocphamm started a new conversation 's' For Searching Site-wide Doesn't Work For Second Stroke

Just know about this feature in the "Middleware Parameters" video and I think it doesn't work very well here.

Specs: OS X El Capitan public beta 2. Safari 9.0.

Open Laracasts.com. Hit "s", it will open the search bar at the top.

Hit "Esc" to hide the search bar. If I'm not clicking anywhere on the page, hitting "s" again won't work.

As soon as I click the page, the "s" works again.

Is is a known bug, intended behavior, or I'm just on an unsupported browser/OS?

Thanks!

13 Jul
4 years ago

ngocphamm left a reply on Laravel And PHPStorm

Yep. Thanks for sharing a workable method, Ian.

I'm just curious of what others' setup so that they can use PHPStorm to comfortably enjoy Laravel. If that contains disabling some sort of PHP inspection, then I will understand and leave it that way.

ngocphamm left a reply on Laravel And PHPStorm

@jaewun I've updated the screenshot. Dropbox seems to auto expire it. Hopefully this will last.

ngocphamm left a reply on Laravel And PHPStorm

This does fix the problem, Ian, but it still just a kinda "workaround" and I still don't understand why PHPStorm doesn't take it when I do. It doesn't recognize the Query part of the full namespace, just like what happens with @return Illuminate\Database\Eloquent\Relations\BelongsTo in the docblock.

public function scopePublished(Illuminate\Database\Query\Builder $query)
{
    $query->where('published_at', '<=',  Carbon::now());
}

ngocphamm left a reply on Laravel And PHPStorm

Bump! So someone who missed it last night can help me out :P Thanks!

ngocphamm left a reply on Difference Between \Mail <> Mail?

And sometimes, without the \ can also be a facade, right? That can make things a little more confusing.

ngocphamm left a reply on Laravel And PHPStorm

I was just not being explicit about the setup. It's Mac, PHPStorm 9.0, and Laravel 5.0. And yes, I do have composer as I used it to install Laravel.

The include and exclude thing under PHPStorm I do understand, and by default, PHPStorm will try to somehow "exclude" the vendor packages, but you still be able to have code completion for that. It's why I still be able to Cmd + Click the belongsTo method to go to the corresponding Illuminate class. It's just 2 things that annoy me, as can be seen from the screenshot.

  1. The where method is marked as not found. It doesn't seem to know the $query is an Illuminate\Database\Query\Builder object. (is it?, I'm new to Laravel anyway).
  2. The docblock yells at me with the red notation that it doesn't know where the Relations part comes from. Apparently, it's not quite true, when, as I stated, I can Cmd + Click to go to that class.

ngocphamm left a reply on Laravel And PHPStorm

Hi @jimmck. Thanks for the answer! It didn't help, though :(

  1. I installed the IDE helper, ran the generate command(s) several times (and I can se Route facade being recognized correctly by the IDE as the result).

  2. I tried to set the directory similar to the post, but no luck (yet).

  3. Installed Laravel Plugin before. Just got the Symphony 2 Plugin, enabled. Didn't help either. Is there any special configuration I need to take care of for the Symphony plugin?

12 Jul
4 years ago

ngocphamm started a new conversation Laravel And PHPStorm

I know this has been mentioned a lot, and I've read most of them. However, today, my attempt to return to PHPStorm (when it's version 9 is still hot served) seems to be a failure.

The tutorial from JetBrains looks good, but it didn't help me out. https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm

This is what bugs me with the IDE, in one screenshot.

bs

If anyone has been successfully setup PHPStorm to work nicely with Laravel without yelling a lot, please help.

Thank you guys!

ngocphamm left a reply on [Newbie] Eloquent Relationship "belongsTo" Doesn't Store

That all worked out! Thank you so much, @JarekTkaczyk!!!

ngocphamm started a new conversation [Newbie] Eloquent Relationship "belongsTo" Doesn't Store

Hi all. I'm slow, and still following the series https://laracasts.com/series/laravel-5-fundamentals.

This is where I got stuck. I'm having trouble changing the "relationship" from "user" to "author". Basically I want $article->author(). I changed the function name to "author", changed the Article table's column name to "author_id", refers to "id" in table User.

However, now when I create a new article, I get this error

SQLSTATE[HY000]: General error: 1 table articles has no column named user_id (SQL: 
insert into "articles" ("author_id", "title", "body", "published_at", "user_id", "updated_at", "created_at") 
values (1, New Article, My first article here!, 2015-07-11 00:00:00, 1, 2015-07-11 13:00:33, 2015-07-11 13:00:33))

I think it's because I used Auth::user()->articles()->create($request->all()); (Route model binding) under the "store()" method but I have no idea how to solve it. Please help.

24 Mar
4 years ago

ngocphamm left a reply on A Few New Things On The Video Page

Why there's only "Like" button for other comments, not for the original post, Jeffrey? I'm gonna be patiently waiting for the remember playback speed. Thank you for all the improvements!!!