michaelnguyen547

michaelnguyen547

Member Since 3 Years Ago

Experience Points
32,800
Total
Experience

2,200 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
267
Lessons
Completed
Best Reply Awards
2
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 7
32,800 XP
Jul
02
2 days ago
Activity icon

Started a new Conversation Best Way To Manage Device FCM Token ?

When a user register/sign in, the mobile app will call register device API. This API creates a row in the device table. The application server uses the token in the device table to send push notification.

I m not sure the best way to handle errors such as:

  • when the FCM token expires or invalid, such as in a queued job that sending a push and received an Exception, how do I tell the mobile app that the token is bad and need to register a new token again?

  • when the mobile app fails to register device API during register new account or signing in, and the API fails, I must allow the user to continue using the app. But need to have a way to tell the mobile app to try to register device later.

Apr
24
2 months ago
Activity icon

Replied to Laravel Vapor 502 Cloudflare Errors

@shylor can you please share how to set up Cloudflare to work with Vapor? I have no issue with default behaviors by using the AWS nameservers. I am trying to use the new gateway-version 2 and Cloudflare.

The vanity URL does not work. And I don't know how to make the custom domain work.

Apr
22
2 months ago
Activity icon

Replied to Make Vapor Deployment Faster?

@flap152 if you have a mac, definitely give Laravel Valet (https://laravel.com/docs/7.x/valet) a try. It took me several hours to make it work. With Valet (no virtual machine), the vapor deployment is way faster.

Mac Mini 2018 - i7 / 32 RAM

  • 7 minutes with Vagrant setup
  • 2 minutes with Valet setup
Apr
19
2 months ago
Activity icon

Awarded Best Reply on Make Vapor Deployment Faster?

2m29s is not that bad. Try this setting to see it reduces your deployment time (https://docs.vapor.build/1.0/projects/the-basics.html#managing-vendors)

CPU/RAM does affect building time. I build the same project on

  • iMac 2015 - i5/ 32 RAM - took 15m
  • Mac Mini 2018 - i7 / 32 RAM - took 7m

Ignore my long build time

Mar
24
3 months ago
Activity icon

Replied to Make Vapor Deployment Faster?

2m29s is not that bad. Try this setting to see it reduces your deployment time (https://docs.vapor.build/1.0/projects/the-basics.html#managing-vendors)

CPU/RAM does affect building time. I build the same project on

  • iMac 2015 - i5/ 32 RAM - took 15m
  • Mac Mini 2018 - i7 / 32 RAM - took 7m

Ignore my long build time

Activity icon

Started a new Conversation How To Set Up Correct Pusher Key For Proper Environment?

in bootstrap.js

window.Echo = new Echo({
    broadcaster: "pusher",
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    encrypted: true
});

I have pusher-staging and pusher-production app key and app cluster. How do I make sure that when deploying to vapor correct pusher key is used?

Activity icon

Replied to Make Vapor Deployment Faster?

how do you set up your local environment? do you use vagrant?

Mar
20
3 months ago
Activity icon

Replied to Require And Export Js File

works like a charm. Thank you very much!

Mar
19
3 months ago
Activity icon

Started a new Conversation Require And Export Js File

I want to customize vapor-js to upload file to s3 . The source file is https://github.com/laravel/vapor-js/blob/master/src/index.js

I created a resources/js/vapor.js and copy/paste vapor-js content file

In resources/js/app.js

window.Vapor = require("./vapor");

I run npm run dev, in a user/_form.blade.php, I have

window.Vapor.store(file.files[0], {
                    progress: progress => {
                        this.uploadProgress = Math.round(progress * 100);
                    }
                }).then(response => {

		});

The browser shows js errors

app.js:42752 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

Uncaught TypeError: Cannot read property 'store' of undefined // for window.Vapor.store

I am not an js expert and have no idea how to fix this

Mar
18
3 months ago
Activity icon

Started a new Conversation Unable Pass UploadFiles Gate When Uploading To S3 Via Vapor

I follow the instruction to set up Policy @ https://docs.vapor.build/1.0/resources/storage.html#file-uploads

I have 'admin' guard for Admin account.

Every time, vapor/signed-storage-url return 403 - authorized.

This is the code doing the check

        Gate::authorize('uploadFiles', [
            $request->user(),
            $bucket = $request->input('bucket') ?: $_ENV['AWS_BUCKET']
        ]);

Any ideas?

Mar
16
3 months ago
Activity icon

Started a new Conversation Setting Up Domain???

Assume I have example.com and the domain.com is the domain registrar.

I do not want to use Route 53 and do not want to update Nameservers on domain.com to Vapor's DNS.

How do I point staging.example.con to Vapor application?

I see Vapor created 2 DNS records

ALIAS - staging.example.com. - esuyz3.cloudfront.net

CNAME - _3cfe4b396e8b7.example.com - _9702a83bf02f1fa.acm-validations.aws

What do I do with these 2 records?

Mar
05
3 months ago
Activity icon

Replied to Alpine Js How To Build X-data

thanks, it works great with @json. One thing is you dont need the double quote

x-data=@json($coupon)

Mar
04
4 months ago
Activity icon

Started a new Conversation Alpine Js How To Build X-data

Hey,

i am new to alpine js and want to know how to put existing data into the x-data

on create page, the x-data should be

x-data={ promo_type : null, discount_type : null }

on edit page, the x-data should be

x-data={ promo_type: 1, discount_type: 1}

I tried x-data={ promo_type : {{ $coupon->promo_type ?? 'null'}} , discount_type: {{ $coupon->discount_type ?? 'null' }} };

It seems to work. Is it the correct way to do it? Better way?

Jan
03
6 months ago
Activity icon

Replied to How Do I Setup Laravel Project Locally With The Intent To Use Laravel Vapor?

@fylzero got it. Uploading file as in uploading profile picture and documents (not the asset files).

But you are correct. There are a lot of questions I have about Vapor

  • Uploading files is difficult to debug
  • How about uploading files from mobile apps?
  • Fixed-size database is only 1 instance, there is no redundancy (people can say pick serverless)
  • What to do if one of your services down? Queue down? SES down? Scheduler down? Who do you talk to?
  • How to debug?
Activity icon

Replied to How Do I Setup Laravel Project Locally With The Intent To Use Laravel Vapor?

@fylzero you are referring to staging environment.

In the video you shared, the uploading file is quite annoying that it does not work locally, but only on vapor. How do you debug these kinds of issues?

Making guess works, commit and deploying to Vapor to verify? I want to avoid these situations.

Jan
02
6 months ago
Activity icon

Started a new Conversation How Do I Setup Laravel Project Locally With The Intent To Use Laravel Vapor?

I try to match the local environment with the production environment as close as possible. I usually use Homestead for the development environment.

When watching Taylor's Vapor video about AWS SES, DynamoDB, Queue, how do I set up so that Homestead development environment will use AWS SES, DynamoDB, Queue automatically as Vapor.

Do I need to set up a development environment on Vapor instead of Homestead? The issue with this is I have to constantly commit and deploy to view the changes.

If I work on Homestead locally, I am worried that things will not work when deploying to Vapor because Vapor is different from Homestead

Activity icon

Started a new Conversation Does Laravel Vapor Requires PHP 7.3+?

I am so confused about Laravel Vapor requirements.

Vapor requires that your application be compatible with PHP 7.3+ and Laravel 6.0+.

Laravel 6+ is required and Laravel 6 requires >= PHP 7.2

What does your application be compatible with PHP 7.3+ mean?

Can my Laravel 6+ project (using PHP 7.2 on local server) work with Laravel Vapor?