EmilMoe

Software Engineer at Online

Member Since 5 Years Ago

Phnom Penh

Experience Points
34,900
Total
Experience

100 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
163
Lessons
Completed
Best Reply Awards
11
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 7
34,900 XP
Nov
17
2 weeks ago
Activity icon

Started a new Conversation Stripe: It Seems I Always Need `->createAsStripeCustomer()`?

I'm creating a SaaS and it seems that it would work better if I call createAsStripeCustomer() in User boot method right after creating (created)? Otherwise methods suchs as this fails:

auth()->user()->subscribed('main')

However the documentation says the following, and that confuses me:

Occasionally, you may wish to create a Stripe customer without beginning a subscription. You may accomplish this using the createAsStripeCustomer method

So how do you handle it for SaaS? I thought about creating a ┬┤isValidStripeCustomer` method, but it's gonna be a lot of checks or maybe I should override the methods such assubscribed` or simply make every user a Stripe user?

And also would you create free users in Stripe under a free plan?

Nov
08
4 weeks ago
Activity icon

Started a new Conversation Npm Run Results In Many Lines: <s> [webpack.Progress]

I have lately had a problem when I run npm run dev or the other built-in commands, the output doesn't come as a progress bar but a line by line progress. Here's an example:

<s> [webpack.Progress] 70% building 776/776 modules 0 active
<s> [webpack.Progress] 78% after module and chunk tree optimization
<s> [webpack.Progress] 79% basic chunk modules optimization
<s> [webpack.Progress] 80% chunk modules optimization
<s> [webpack.Progress] 80% advanced chunk modules optimization
<s> [webpack.Progress] 81% after chunk modules optimization

Is this a failure in the setup of Laravel or something on my machine and can i fix it?

I'm using Windows 10 and Git Bash with MINGW64

Activity icon

Replied to Php Artisan Not Working

@nakov amazing!

Nov
06
1 month ago
Activity icon

Awarded Best Reply on Translator::trans Does Not Exist

Nevermind. It was a vendor that hasn't been updated to Laravel 6 and the error handler pointing at the wrong file.

Activity icon

Replied to Translator::trans Does Not Exist

Nevermind. It was a vendor that hasn't been updated to Laravel 6 and the error handler pointing at the wrong file.

Activity icon

Started a new Conversation Translator::trans Does Not Exist

When I use __() I get the following error referering to the old trans()

Method Illuminate\Translation\Translator::trans does not exist. (View: /var/www/html/resources/views/pages/dashboard.blade.php)

What can the problem be? __ must be referering to trans() somewhere.

I also tried to install laravel/helpers but with no luck.

Oct
12
1 month ago
Activity icon

Started a new Conversation Passport For A Package

I would like to create a package others can install in their Laravel, which will communicate with my app.

I thought I would do that by using Laravel Passport, but I feel the authorization step will be a problem here?

I know many developers will simply ask you to add secret and client_id to .env. Should I simply use skipsAuthorization and let my package gather a token and keep it up to date?

Oct
08
1 month ago
Activity icon

Replied to Multiple Databases

@martinbean

I agree that is a better approach, unfortunately the setup has been developed for 1 client and it will require a lot of work and testing to ensure that the database works for multiple clients. It might be good to migrate towards this in the long run, but it's also a time consuming migration unfortauntely.

Activity icon

Started a new Conversation Multiple Databases

How would you handle multiple databases in Laravel?

I want to use the same codebase for several clients, but they will be on different databases. I thought first I could override the env from Apache, but then I don't see how I can run migrations? So I need to be able to set up different databases for different clients (they can be identified by the domain they access from, as they will be on different subdomains), and it must also work with migrations.

I could add DB_CONNECTION=mysql_client1, DB_CONNECTION=mysql_client2 and so on, but that would give a lot of repetitive code and some maintenance when clients are created or removed. Could I maybe have an initial database and retrieve the client data from there or how would you solve this?

Jun
19
5 months ago
Activity icon

Replied to How To Create A Pin Like Passsword?

You can specify custom fields to verify your users by, if that's what you mean: https://laravel.com/docs/5.8/authentication#authenticating-users

If you want to "pin auth" them after they log you could create a middleware called something like Verified or AuthWithPin or what you would like. So that when a user is authed, but not yet with a pin, this will be triggered. (You need to store the pin status in a session).

Easiest option is of course to include the extra parameter at login.

The reset part is a matter of generating a token, call the column pin_tokenand send an email to the user with a token link that will reset the pin.

Activity icon

Replied to Vue - Parse JSON String

The more logically setup would be that every node is a row, not a column. From there you could either have named properties or just iterate, but you should have a schema for the table setup that describes the number of columns and maybe their header.