eugenevdm

Partner/Owner at Vander Host & Fintech Systems

Member Since 5 Years Ago

Cape Town

Experience Points
132,075
Total
Experience

2,925 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
1299
Lessons
Completed
Best Reply Awards
0
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 27
132,075 XP
Apr
12
1 day ago
Activity icon

Replied to Laravel Forge + Redis

@nam thank you! I installed my Forge server around a year ago and was super paranoid of automatic updates so never enabled them. Then this weekend the server acted up so I did apt-get upgrade and rebooted and this stabilized the server. However, redis stopped working. Your commands are spot on, in my case, for PHP 7.4

Mar
10
1 month ago
Activity icon

Replied to Validate A Date Based On Another Input Request Field

Ah! This is what you meant, add another section and update the message:

'transferred_at' => 'required|date_format:"Y-m-d"|after:sold_at|after:' . $after . '|before:' . $before,

message:

'transferred_at.after' => 'The date of transfer must be after the date of sale and less than 90 days ago',

EDIT:

Still not working. You can't have two after sections the first one overrides the second one.

Activity icon

Replied to Validate A Date Based On Another Input Request Field

Hi @bugsysha ,

Having considered my options of using Laravel's built in automated rule resolution and doing it manually using $this->input I'm starting to lean towards just adding some code to do the checks. So if I use $this->input can I just do a return with a message if the value is wrong?

Activity icon

Replied to Validate A Date Based On Another Input Request Field

Hi MostafaGamal,

I tried this:

return [
            'transferred_at' => 'required|date_format:"Y-m-d"|after:' . $after . '|before:' .  $before,
            'transferred_at' => 'after:sold_at',
            'sold_at'        => 'required|date_format:"Y-m-d"|before:' . $before,            
            'photo_path'     => 'max:5000000', // 5 MB
        ];

Now it seems the second transferred_at overrides the first one?

The transferred_at needs three actual checks:

  1. It must not be in the future
  2. It must be less than 90 days ago.
  3. If must be at least one day more than the sold_at date.

Unless I misunderstood you?

Also then tried adding a message for that below and that also doesn't seem to work because I don't think you can have transferred.after:sold_at and transferred_at.after. And sure two transferred_at.after doesn't work?

return [
            'transferred_at.after:sold_at' => 'The transfer date must be after the sale date',
            'transferred_at.after'         => 'The date of transfer must not be more 90 days ago',
            'transferred_at.before'        => 'The transfer date cannot be in the future',
            'sold_at.before'               => 'The date of sale cannot be in the future',
            'photo_path.max'               => 'The property photo cannot be larger than 5 Megabytes',
        ];
Activity icon

Started a new Conversation Validate A Date Based On Another Input Request Field

I have this beautiful date validation code below that works like a charm. Now the problem is the sold_at date must before before the transferred_at date.

So my question is how would I do additional validation using before based on something something (transferred_at) that is there already?

And as a bonus, how can I update the fancy feedback messages if .before has already been used in that context? Something like before.2?

public function rules()
    {                
        $before = Carbon::now(); // the dates cannot be in the future

        $after  = Carbon::now()->subDays(90); // a transfer cannot be older than 90 days

		// insert new rule here where the sold_at date must be before the transferred_at date

        return [
            'transferred_at' => 'required|date_format:"Y-m-d"|after:' . $after . '|before:' .  $before,
            'sold_at'        => 'required|date_format:"Y-m-d"|before:' . $before,            
            'photo_path'     => 'max:5000000', // 5 MB
        ];
    }

    public function messages()
    {
        return [
            'transferred_at.after'  => 'The date of transfer must not be more 90 days ago',
            'transferred_at.before' => 'The transfer date cannot be in the future',
            'sold_at.before'        => 'The date of sale cannot be in the future',
            'photo_path.max'        => 'The property photo cannot be larger than 5 Megabytes',
        ];
    }
Feb
28
1 month ago
Activity icon

Replied to Old Input File Laravel

You cannot repopulate the file element

This is so interesting! I wish I could find an official spec about this, instead of Stack.

Feb
25
1 month ago
Activity icon

Replied to Laravel Livewire Form Radio

The advice of {{ $form['isCompany'] }} is spot on and crucial in troubleshooting and understand Livewire radio button issues.

I came back to this post after struggling for days to get this perfect on the Laravel Livewire Jetstream Profile update screen. In my scenario I had both a dropdown select, and a checkbox. Both needed conditional show and hide functionality.

After hours of struggling I can tell you the rules are:

  1. Don't use checked on radio buttons as Livewire will take care of everything.

  2. Be sure to bind all your radio buttons to the same model.

  3. If you're usings booleans in your database, native storage are 0s and 1s. Make sure value="0" and value="1" otherwise Livewire won't set them properly when loading.

  4. When updating your database, do this: 'has_partner' => $input['has_partner'] == '1' ? true : false,

  5. Change events on both select and checkboxes would need to refresh the page. In my case I just call an empty refresh() method on the component but I'm sure there is a better way.

Here are the fruits of my labour:

https://imgur.com/a/OeEPpUj

In the screenshot, normally the Other Agency and Partner fields are hidden until "Other" and "Partner" are clicked.

Feb
23
1 month ago
Activity icon

Replied to JetStream Profile Management - UpdateProfileInformationForm.php

What a lifesaver! For noobs like me I also has to change the namespace of the class after the copy:

// namespace Laravel\Jetstream\Http\Livewire;
namespace App\Http\Livewire;

But honestly if you're building something a little more sophisticated than normal this kind of customization is a must. It would be a great inclusion in the Jetstream Livewire documentation.

Jan
25
2 months ago
Activity icon

Commented on Meet Teamsy

This is wonderful and exactly what I was looking for!

One question though, is the source available?

Jan
17
2 months ago
Activity icon

Replied to Stripe\Exception\InvalidRequestException: No Such Plan:

I have a similar problem. Below the error:

Stripe\Exception\InvalidRequestException
No such plan: 'price_xyz'

I've checked so many time, that price_xyz is correct. I even deleted it and made new ones. I just don't seem to get past this error.

Jan
13
3 months ago
Activity icon

Replied to 502 Bad Gateway Timeout Error - Recurring Problem.

It's incredible how the Laravel guys managed to solve this common problem by actually updating three key parameters!

Dec
17
3 months ago
Activity icon

Replied to Testing Multiple Select

Hey @calebporzio ,

It's been five years since you've posted this, any clues how to do this:

->select('suburb[]', [641,4500])

Does Selenium allow select multiple in testing?

Oct
26
5 months ago
Activity icon

Replied to How To Install SNMP (additional PHP Library) On A Forge Server

Thanks for the reply. I ended up running the above command and it seems to work and only install SNMP so all good.

Oct
25
5 months ago
Activity icon

Started a new Conversation How To Install SNMP (additional PHP Library) On A Forge Server

On my non-forge shared systems I can do this:

sudo apt-get install php7.4-snmp

but on a Forge server I'm scared to break something. I notice when you type that command it wants to install a bunch of things already installed so I guess I have to do it differently.

Any clues?

Oct
20
5 months ago
Activity icon

Replied to Create L8 API - Not An SPA, No Passport Needed, Plain Old API

Yep I learnt that the hard way now. The Sanctum documentation talks about token based authentication but it quickly delves into creating tokens and showing them to the user and so on which is overkill for what I wanted to do. It seems that we are being directed towards creating SPA's or refreshing tokens and so on.

All I wanted to do was a simple API. What's gone away are the two places in the manual that explains how to do it the old way.

Activity icon

Replied to Create L8 API - Not An SPA, No Passport Needed, Plain Old API

Thanks @bobbybouwmann I managed to get it working in the traditional way.

What's a bit blind is that entire old school way of doing it has been removed from the manual and doing it the Sanctum way seems impossible for simple APIs.

Oct
19
5 months ago
Activity icon

Started a new Conversation Create L8 API - Not An SPA, No Passport Needed, Plain Old API

I'm struggling to create an API with Laravel since Sanctum. I first want to mention my really simple requirements:

  1. I'm not creating an SPA.
  2. I'm not using Vuejs.
  3. I don't want or need Passport. The overhead of OAth is not needed.
  4. I don't want cookie based authentication
  5. I simply want API tokens.
  6. I will make add-hoc requests from the internet, for example, I might be using Postman for testing.
  7. I don't session authentication, just "a simple API request and response".

In older versions (5.8 + 6.0 for example) I could simply create an api_token field on the users table and get cracking.

Not so much anymore. Now it seems Sanctum is the tool and the documentation quickly leads you into lots of complexity. What am I missing? Prior attempts at doing this worked fine for localhost but the moment I moved to Postman and the internet I had all kinds of authorization issues because it seems Laravel 8 is now expected lots of extra that I don't know what to add.