pilat

pilat

Member Since 3 Years Ago

Experience Points
41,300
Total
Experience

3,700 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
371
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.

Level 9
41,300 XP
Jan
20
1 week ago
Activity icon

Commented on Tennis Match Kata

Add for the refactor, maybe: $this->eachReached(2), $this->eachReached(3)?

Jan
16
1 week ago
Activity icon

Commented on Notes And Policies

Just a "readabilty" note: in the "only authenticated user" tests, I personally find it not explicit enough that the project we create right after we've signed in — that it's created under another user. One needs to see the Factory to understand this. Are there any considerations on how to improve this point?

Jan
10
2 weeks ago
Activity icon

Commented on A Project Requires An Owner

In the ProjectFactory, why owner_id should be the callback? What purpose does it serve?

Can't it be, like: 'owner_id' => factory(App\User::class)->create()->id,?

Jan
07
2 weeks ago
Activity icon

Commented on Series Chapters

Is there a special reason to use MySQL TEXT type for storing JSON?

Jan
06
3 weeks ago
Activity icon

Commented on Branching

I have a question: what if that "abuot"-bug makes it hard for me to work on the reporting feature? How can I have it fixed in both branches and avoid conflicts later?

Another example:

  1. I've implemented some "Feature A", with adding some useful accessors/scopes along the way.

  2. That feature is now pushed to GitHub and there's a Pull Request awaiting for reviewing and merging.

  3. I'm currently working on another feature ("Feature B") and I realise that I need to use the same scopes/accessors here as well.

What would be the suggested workflow in these cases?

Dec
27
1 month ago
Activity icon

Commented on Merging And Tweaking A Large PR

During this whole video I wanted to finally see how to properly merge PR with corrections, maybe a few words on ff, squash and other strategies…

And this very part was skipped in the end :-(

Otherwise — great series!

Dec
17
1 month ago
Activity icon

Commented on Prime Factors Kata

Sorry, I seem to miss something… If we increment the `$divis by one, what ensures that it (the divisor) is always going to be prime number itself?

Dec
01
1 month ago
Activity icon

Commented on Collections

What is the difference between flatten() and collapse()?

Oct
29
2 months ago
Activity icon

Commented on Deploy Your Website

Can you explain why echo "" | before the php-fpm reload command?

Oct
17
3 months ago
Activity icon

Commented on Migrations 101

It looks to be "Nord" ( https://laracasts.com/comments/1448 ) They have it in VS Code as well ;-)

Oct
07
3 months ago
Activity icon

Replied to Service Container: A Proper Way To Rebind Service In Each New Job

Ok. Maybe, two simpler questions:

  1. How to unset (destroy, nullify) specific service? Like App::forgetInstance('Querty') (I saw this in stackoverflow, but couldn't find it in the SDK documentation for 5.8 probably, removed from framework?)

  2. Is there some kind of a "job ID", accessible from within deferred service provider? I'd like to check if there's an instance for current job and create new one only in case of "NO".

Oct
02
3 months ago
Activity icon

Replied to Service Container: A Proper Way To Rebind Service In Each New Job

Just came to my mind: sanitising would also be an issue For a sake of simplification, let say, I'll just cache it for one minute (so, theoretically, it can be rebind again even within one job, if it's started "between minutes"):

$epochMinute = intdiv(time(), 60);

# Caching/kinda singleton
if (! empty($this->instances[$epochMinute][$subdomain])) {
    return $this->instances[$epochMinute][$subdomain];
}

After some time, there will be quite many instances in the memory, and how do I know which ones are not used by any other jobs any longer (maybe, there's some very long synchronization right in the moment)?

Activity icon

Started a new Conversation Service Container: A Proper Way To Rebind Service In Each New Job

I have Laravel Horizon on my server, which means, in particular, that queue workers are long-running processes.

Then I have service providers that cache bindings ("semi-singleton", you name it). The code is like this:

public function register()
{
    $this->app->bind(MyService::class, function ($app, $parameters) {

            $subdomain = isset($parameters[0]) ? $parameters[0] : null;

            if (is_null($subdomain)) {
                return null;
            }

            # Caching/kinda singleton
            if (! empty($this->instances[$subdomain])) {
                return $this->instances[$subdomain];
            }

            $this->instances[$subdomain] = $this->performSomeLongInitialization($subdomain)

            return $this->instances[$subdomain];
    });
}

This works like a charm for the web requests, but in queued jobs I need to re-init MyService more often than I re-load horizon. Ideally, to re-init it in each next job. Is there some global identifier, like jobId or I don't know, which I could use in service provider to decide if I need to initiate the service again?