michael1986

michael1986

Member Since 4 Years Ago

Experience Points 23,160
Experience Level 5

1,840 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 239
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

11 Mar
3 months ago

michael1986 left a reply on Make A Relation Count Field Sortable In Nova

Thanks @anderly! Learned something new today :-)

21 Feb
4 months ago

michael1986 started a new conversation Make A Relation Count Field Sortable In Nova

Hi all,

I'd like to know if it's possible to make a relation count field sortable in Nova.

Number::make(__('Categories'), function () {
    return $this->categories->count();
}),

Obviously adding ->sortable() doesn't work here.

09 Jan
5 months ago

michael1986 left a reply on Force Nova To Use Another Locale

Finally I've found the solution. Creating a middleware did a lot but wasn't sufficient.

Removing the middleware and adding this in the boot function of the NovaServiceProvider did the trick:

Nova::serving(function (ServingNova $event) {
    app()->setLocale('nl');
});
03 Jan
5 months ago

michael1986 left a reply on Force Nova To Use Another Locale

I'm not talking about the translations of my resources, it's about translating the buttons and headers coming from Nova.

Sure enough I'm not going to modify the source code of Nova itself, as it's absolutely bad practice.

michael1986 left a reply on Force Nova To Use Another Locale

@vlad_kash Thanks, I know, that's already working as it should.

I mean the buttons like "Create & add another", "Create" and headers like "New {resource name here}", texts in metric cards like "No Prior Data" and "No Current Data". And messages when a resource has no items yet, like "No bestelling matched the given criteria.".

All those things are translated in my localization file, but they won't show up. I've checked the JSON for errors, but it's a valid file.

02 Jan
5 months ago

michael1986 left a reply on Force Nova To Use Another Locale

@vlad_kash Thanks, that did a lot but it looks like there is some bug in Laravel Nova which causes the sidebar to be translated as it should, but everything else on the right side of the screen stays in English. Pretty weird...

26 Dec
5 months ago

michael1986 left a reply on Force Nova To Use Another Locale

@TORPEDO - Thanks for your reply but that is not what I want. I want the main application to stay English as a main language, but Nova to use the Dutch locale.

22 Dec
6 months ago

michael1986 started a new conversation Force Nova To Use Another Locale

Hi all,

I'd like the main Laravel application locale to be English, so I configured it this in the config file. Is there a way I can force Nova to use another locale like Dutch?

Should be fairly easy I guess, but I can't seem to get it right.

Thanks!

17 Sep
9 months ago

michael1986 left a reply on Filter An Array, Using An Array

@tykus ... have I told you already that that I love you? ;-) Thank you so much!

michael1986 left a reply on Filter An Array, Using An Array

Nope, no null values here. Also no errors in the console. I'll continue playing around with it and let you know whenever I found a solution for this. Thanks! :)

michael1986 left a reply on Filter An Array, Using An Array

@tykus thanks! I thought so too, but when I do that, no results will return.

michael1986 started a new conversation Filter An Array, Using An Array

Hi all,

I've building this search function where I need to filter an array of users. When I'm using a string comparison it's all fine, but when I need to filter the users based on an array of options I'm having some troubles.

Like when I want to filter the users based on gender, and I select both male and female, how should I filter this?

This works fine with strings when this.gender = 'm'

return users.filter(user => user.gender === this.gender)

But how do I get this working when this.gender = ['m', 'f'] ?

Thanks! :-)

22 Jun
1 year ago

michael1986 left a reply on Laravel Valet - *.php File In Public Not Running

I've got this issue too. Anybody knows how to solve this?

17 May
1 year ago

michael1986 started a new conversation Batch Update Content Disposition S3 Files

Hi all,

I've got a project with thousands of files stored on S3. My client now wants a new feature where I need to update the content disposition of all those files.

I know you can set this while uploading to S3, but how can I do this with existing files. Unfortunately, uploading all files all over again is not an option as this will take 4 days.

Hope somebody can help me on this one.

Thanks!

Michael

24 Feb
1 year ago

michael1986 left a reply on Intervention Image Orientation Taken By IPhone

@tykus Thanks for your suggestion, I've used rotate(270), but it still feels like some kind of hack for this issue.

@jaec86 I'm using the same vue component. As said, the image is showing in portrait mode in the vue component, but is uploaded in landscape mode.

michael1986 started a new conversation Intervention Image Orientation Taken By IPhone

Hi all,

For my project I need to upload images using an iPhone. This will be done in portrait mode, using a vue component which actually shows the image in portrait mode. The component creates a base64 version of the image which will be posted. So far so good.

On the Laravel side, this is a part of the function so far:

// Strip the first part of the base64 value.
$image = explode('.', $data['image']);

// Decode base64 value
$image = base64_decode($image[1], true); 

// Make image with auto orientate
$image = Image::make($image)->orientate();     
          
// Resize image
$image->resize(800, null, function ($constraint) {
    $constraint->aspectRatio();                       
});                                    

// Stream image               
$image = $image->stream()->__toString();      

// Save to S3.
Storage::disk('s3')->put($filename, $image, 'public'); 

Now the image actually gets uploaded to S3, but still in landscape mode, while take in portrait mode.

PHP is build using --enable-exif, using version 7.1.14

Anybody got an idea what to do next?

11 Feb
1 year ago

michael1986 left a reply on Pusher Not Displaying The Message In Laravel 5.3

I know it's a bit late, but I also spent an hour on this when using Laravel 5.6. I forgot to start Horizon, so no broadcasts where sent to Pusher. Talking about silly mistakes... ;-)

27 Jan
1 year ago

michael1986 left a reply on Horizon Job Timeout Issue

+1, got exactly the same issue. Works fine on local machine.

22 May
2 years ago

michael1986 left a reply on Passport With Multiple Auth Provider

Thanks @Sabbah for your description. I'm trying to implement those changes into my app but everytime I want to authorize I'm being redirected to "/login" instead of "/client/login". I'm stuck for days now, got an idea how to fix this?

13 Jan
3 years ago

michael1986 left a reply on Custom Validation Rule For VAT

That simple,... Thank you MyOkram!

12 Jan
3 years ago

michael1986 left a reply on Custom Validation Rule For VAT

Thank you @tuneless, very helpful!

Is it possible to make the error message multilingual? The code I used below throws an error.. :(

private $_custom_messages = array(
        "vat" => trans("client.vat_validation_error")
);