Software Engineer at Online

Member Since 6 Years Ago

Phnom Penh

Experience Points
37,350
Total
Experience

2,650 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
164
Lessons
Completed
Best Reply Awards
12
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.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 8
37,350 XP
Mar
23
3 weeks ago
Mar
22
3 weeks ago
Activity icon

Replied to DigitalOcean Spaces Adds Bucket Before Endpoint ?

It looks like this did some breaking changes?

             "name": "aws/aws-sdk-php",
-            "version": "3.174.2",
+            "version": "3.175.0",

--

Might be related to this?

https://github.com/aws/aws-sdk-php/commit/15911de97ad3665dadc77029d8ab0ddbed53ede2

--

I'm behind reverse proxy, not sure if that causes issues.

Activity icon

Started a new Conversation DigitalOcean Spaces Adds Bucket Before Endpoint ?

Suddenly I have an error on my server, the error is not locally though it's identical, where the bucket is added in front of the endpoint for S3 (DigitalOcean). Like this: bucket-name.https://fra1.digitaloceanspaces.com

Everything working until I refresh the docker container today.

The config is like this:

            'driver' => 's3',
            'key' => env('S3_ACCESS_KEY_ID'),
            'secret' => env('S3_SECRET_ACCESS_KEY'),
            'region' => 'FRA1',
            'bucket' => 'bucket-name',
            'endpoint' => 'https://fra1.digitaloceanspaces.com',
            'root' => '/assets',
            'visibility' => 'public',
Mar
05
1 month ago
Activity icon

Replied to Target Class [hash] Does Not Exist

So Google App Engine doesn't allow simple (My)SQL executions? Because then it should work, or? Unfortunately, these 'smart solutions' easily cause trouble as compatibility fails.

Mar
04
1 month ago
Activity icon

Started a new Conversation Socialite, Azure AD And "Conditional Access"

I made a Socialite driver for Azure AD based on this repo: https://github.com/BePark/socialite-azure-oauth

It is the client who owns the AD. Yesterday they chose to set up something called "Conditional Access", which seemingly now prevents our driver from working.

Does anyone have experience with this? Do I need to set some other headers or change the procedure?

The only error I get is this very vague one:

Client error: `POST https://login.microsoftonline.com/xxxx-xxxx-xxxx-xxxx-xxxx/oauth2/token` resulted in a `400 Bad Request` response: {"error":"interaction_required","error_description":"AADSTS50076: Due to a configuration change made by your administrat (truncated...)

If it helps, this is the information I could find about Conditional Access: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-conditional-access-dev-guide

Activity icon

Replied to Target Class [hash] Does Not Exist

Hi @vladimir.b,

I think the error is a generic one. The certificates (files basically) were custom to my setup. The error indicates something is crashing early on, like in a ServiceProvider.

Hope it helps.

Emil

Jan
25
2 months ago
Activity icon

Replied to Github Action Failed: Test Directory Not Found

Forgot the actual error:

Test directory "/home/runner/work/project/project/./tests/Unit" not found
Error: Process completed with exit code 2.

Activity icon

Started a new Conversation Github Action Failed: Test Directory Not Found

My Github action is failing due to the file path.

Any ideas?

I'm using the almost default action there for Laravel:

name: Laravel

on:
  push:
    branches: [ dev, master ]
  pull_request:
    branches: [ dev, master ]

jobs:
  laravel-tests:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/[email protected]
    - name: Setup PHP
      uses: shivammathur/[email protected]
      with:
        php-version: '7.4' 
    - name: Install Node Dependencies
      run: touch ~/.npmrc \
        && echo "@***:registry=http://npm.***.com/" > ~/.npmrc \
        && echo "//npm.***.com/:_authToken=\"${{ secrets.NPM_AUTH_TOKEN }}\"" >> ~/.npmrc \
        && echo "unsafe-perm=true" >> ~/.npmrc \
        && npm install
    - name: Copy .env
      run: php -r "file_exists('.env') || copy('.env.example', '.env');"
    - name: Install Dependencies
      run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
    - name: Generate key
      run: php artisan key:generate
    - name: Directory Permissions
      run: chmod -R 777 storage bootstrap/cache
    - name: Create Database
      run: |
        mkdir -p database
        touch database/database.sqlite
    - name: Execute tests (Unit and Feature tests) via PHPUnit
      env:
        DB_CONNECTION: sqlite
        DB_DATABASE: database/database.sqlite
      run: vendor/bin/phpunit
Jan
19
2 months ago
Activity icon

Replied to Increasing Composer Memory

Never seen it elsewhere than Windows.

Activity icon

Replied to Increasing Composer Memory

Might be true, and it's a lot faster.

These limits are usually on Windows, not Linux nor Mac.

Activity icon

Replied to Increasing Composer Memory

You can simply write this to your Terminal:

COMPOSER_MEMORY_LIMIT=-1

My experience is that it works sometimes.

Activity icon

Replied to What Is The Logout Http Code ?

Since the logout would kill the session, it is, as I phrased, the closest. But indeed, 200 is the correct, as said.

Activity icon

Replied to Email Notification For Multidomain Website

As mentioned you could set the config on the fly, but better to switch the variable to look at the database.

You can set all these variables when you send an email: https://laravel.com/docs/8.x/mail#configuring-the-sender

Or is it somewhere else you want to use the information?

Activity icon

Replied to What Is The Logout Http Code ?

Yes, and the appropriate code would be 200 since it's the expected result.

The only official code that comes close is 440

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Activity icon

Replied to How To Get Full_name

Whether you call it

  • full_name
  • fullName
  • fullname

I would always go for a method, not an attribute since you cannot write to it. In my opinion, the attribute accessor would be confusing over time.

public function fullname() {
  return $this->firstname +' '+ $this->lastname;
}
``
Activity icon

Replied to Email Notification For Multidomain Website

I would implement such in the database. Create a table called sites, clients, or something more relevant. This table will have 1) the domains 2) the variables/strings associated with that domain.

Site::domain($domain)->fromAddress;
Jan
18
2 months ago
Activity icon

Replied to Select Records, From Where Log Failed

Yes, I think you are right. There was another answer saying this, but the author deleted it. I just wanted to be sure that I wasn't missing anything. Thanks.

Activity icon

Replied to Select Records, From Where Log Failed

Yes, something in that direction, however, if the 2. last failed, but the last succeeded, this would query the 2. last.

Activity icon

Started a new Conversation Select Records, From Where Log Failed

I have a table with tasks, and another with logs (task_logs). I want to make a scope that queries all tasks which failed.

Is it possible to do this without saving the last status in task table?

Dec
15
4 months ago
Activity icon

Replied to Skipping 😳PSR4

Livewire has to remove the blank space in the filename

Activity icon

Replied to Laravel Migration MySQL Fail Error 150

Are the primaries also BigIntegers?

Dec
01
4 months ago
Activity icon

Replied to PHP - Opposite Of Array_merge?

How should PHP know how to split an array?

Activity icon

Replied to Send Data From An Array To A View

You want to open a new page (view) with the user that's clicked? Then you need to make a route and pass $perfil->id.

Activity icon

Awarded Best Reply on Optimizing Vue Code

I realized it's not possible to pass a method like that, but you can inline it like here:

https://jsfiddle.net/nsh0v95c/1/

From there you can either call another method or simply inline it if it's short, but it's harder to reuse of course.

Activity icon

Replied to Optimizing Vue Code

I realized it's not possible to pass a method like that, but you can inline it like here:

https://jsfiddle.net/nsh0v95c/1/

From there you can either call another method or simply inline it if it's short, but it's harder to reuse of course.

Activity icon

Replied to Vue.js Not Detected In Production

You do not need to "install" it on the server as it's along with your app. Did you push the .js files to git? Or do you run npm run prod on the server? (You need to do one of these).

Could be something wrong with the settings. Is it possible for you to share a link to the site?

Activity icon

Replied to Optimizing Vue Code

You can maybe add it to <button> but you cannot use :key on <template> 😊

Activity icon

Replied to Optimizing Vue Code

You can do it like this

<template v-for="btn in buttons">
  <button :class="{bspin : dis}" :disabled="dis" class="create" @click.prevent="btn.click">{{ btn.label }}</button>
</template>

...

data() {
  return {
    buttons: [{click: this.organizer(), label: 'Organizer}, {...}]
  }
}

It won't save much code, but if you need to edit the HTML it will save you time.

Nov
18
4 months ago
Activity icon

Started a new Conversation Laravel And Tailwind

I'm trying to install Tailwind, but so far I haven't succeeded to build my assets as it keeps failing:

ERROR in ./resources/css/tailwind.css
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: PostCSS plugin tailwindcss requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users

I do have postcss installed:

"postcss": "^8.1.7",
Nov
01
5 months ago
Activity icon

Started a new Conversation S3: 503 Slow Down

I'm receiving this a lot. As far as I can see, I have to implement something that pauses like 1 second every time I get this error?

Does such fix exist for Laravel Filesystem?

Oct
14
6 months ago
Activity icon

Replied to BrowserSync + Valet. Not Possible?

I just realized the command for BrowserSync is npm run watch. That helps a lot of course!

However, can someone help me how to enable hot reload so I don't have to refresh ?

Activity icon

Started a new Conversation BrowserSync + Valet. Not Possible?

I'm trying everything here to make BrowserSync (npm run hot) to work. But no matter what I do the asset URLs are not working at all.

I tried to add this config:

    .browserSync({
        open: false,
        host: 'project.test',
        proxy: 'project.test',
    })

But the domain serving it is wrong and the asset paths are not working.

 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from http://localhost:8080/

What can I Have been doing wrong?

Oct
13
6 months ago
Activity icon

Started a new Conversation DigitalOcean Apps, Laravel Scheduler

I found this thread in DO's support community: https://www.digitalocean.com/community/questions/cron-jobs-for-app-platform

However, as I write there, I have still not managed to set up such a worker for Laravel cronjobs/scheduled tasks in DigitalOceans new "Apps". My solution so far is manually hosting a droplet for this purpose, which I then have to manually update.

It seems as the problem is, that the worker cannot access NPM repositories online and I have no clue how to disable npm install, and I'm sure if I did that, then composer install would suffer after.

Have any of you managed to get this working?