cgfdoo

cgfdoo

Member Since 1 Year Ago

Experience Points
4,300
Total
Experience

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
34
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 1
4,300 XP
Sep
24
1 month ago
Activity icon

Replied to UPDATE USER ON THR PROGRESS OF A RUNNING QUEUE

If you're on Laravel 8, have a look at the Job Batching API. You can divide the email sends into batches and whenever a batch completes you write that to somewhere and display that in the UI (for example with polling as suggested by @sinnbeck).

Docs: https://laravel.com/docs/8.x/queues#job-batching

Sep
23
1 month ago
Activity icon

Awarded Best Reply on Need Help With Brainstorming An Idea For A Centralized Events Catcher

Having an API sounds reasonable to me since, depending on the design, it won't lock you in to Laravel itself which is an added benefit. If you wanted to use this to collect telemetry from desktop clients it would be simple enough to use (your mileage may vary).

In terms of the "how", a wildcard event listener + queuing the actual API request should help get things out of the way for the user. You don't want to have such a logging request ruin it for your users.

This is just my personal opinion, there are probably 101 ways to do this.

Sep
10
1 month ago
Activity icon

Replied to Is This A Safe Way To Send Files?

[...] is this a safe way to send attachments [...]

Assuming you mean "free of viruses and malware" when you say "safe" then it is probably not the safest way since a user can probably attach whatever they want but it is also not the worst. Sending files around online is never a safe affair, regardless of how you receive the file.

Two suggestions for a (slightly) safer way:

  • Do malware scanning on your server before sending out the email with the attachment. This obviously isn't 100% safe since it may contain a virus/malware that is not yet known to your scanner but it helps
  • Instead of sending the attachments directly, link to them in the message where you can do an ad-hoc malware scan before allowing the user to download the file(s). This may be safer since you can perform the most up-to-date scan but also requires you to host files and it is cumbersome for the user
Activity icon

Replied to Need Help With Brainstorming An Idea For A Centralized Events Catcher

Having an API sounds reasonable to me since, depending on the design, it won't lock you in to Laravel itself which is an added benefit. If you wanted to use this to collect telemetry from desktop clients it would be simple enough to use (your mileage may vary).

In terms of the "how", a wildcard event listener + queuing the actual API request should help get things out of the way for the user. You don't want to have such a logging request ruin it for your users.

This is just my personal opinion, there are probably 101 ways to do this.

Activity icon

Replied to Cron Job Trying To Update A Column Based On A Number Monthly

Assuming that you're essentially want to build a system that has employees "earn" n-days of PTO for each period they're employed I would go down this route:

  1. Forget about the form, either store it in a config object or in your .env file, within a config file within the config directory as a static config value OR store it dynamically on the user object or some other config related object if you really need to manually update it or have a different value for it on a per-user basis
  2. Stick to your Artisan command and just schedule it - https://laravel.com/docs/8.x/scheduling

From a code perspective you'd have something like this (mostly pseudo-code):

public function handle() {
    // 1. Get all users
    $users = User::all();
    // 2. Update the value of "earned" PTO using the config value  
    $users->each(function($user) {
        // ...
        $user-> leave_days_granted = $old_value + $days_earned - $days_used;
        $user->save();
    })
}

You can obviously refine it by making the ID of the user a parameter for the command but that seems unnecessary to me if you want to automate this.

Now, in terms of connecting the "days earned" to a form, if you really must, you either make a form that edits the user/user-config if it is user based and then just update the value in your database or it modifies a central config object. Otherwise just stick to the static config using your env file/config PHP file.

Sep
04
1 month ago
Activity icon

Replied to How To Stop Human Spammers?

Is there a way to stop spammers? Actually human spammers?

Echoing what @automica said, you'd be very rich and also a very hated person I guess ;) I guess all you can do is make the life of spammers harder.

Anyways, here are some additional ideas you can consider to weed out more spam:

  • Analyse the content of the message on submission. Look for things that look spammy like a lot of URLs, specific words or other characteristics. Nuclear option: build your own ML model, using the spam you already have as training data. That is obviously a very heavy thing to do.
  • Use an external API to check a piece of text for spamminess (something like Akismet comes to mind, is that still a thing?). A downside of this is that it has obvious implications in regards to privacy of the person submitting the content.
  • Add rate-limiting to form submissions based on information from the form/client. Depending on how bad things are, this will obviously only slow folks down.
  • I doubt that human spammers, like bots, fill out forms manually (read: type every character themselves). Time how long it takes a visitor from page load to submission, that may be a good additional signal to decide whether something is spam or not

None of the suggestions are a silver bullet but they might help make a difference in driving down the amount of spam you receive.