ehabafia

Software Engineer at Playstones

Member Since 7 Years Ago

Mississauga, ON

Experience Points
100,680
Total
Experience

4,320 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
1120
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 21
100,680 XP
Jun
10
2 days ago
Activity icon

Replied to Force No Queue On A ShouldQueue Job Class

Sorry,

I am talking about v7.30.4

Activity icon

Started a new Conversation Force No Queue On A ShouldQueue Job Class

I have a class:

class Class implements ShouldQueue
{}

I need to call it sometimes but I don't want it to be queued, I need it to be processed directly.

$result = Class::dispatch($arg, $cache);

Is there a way to call it to dispatch but force it to process on the spot?

Thank you,

Mar
21
2 months ago
Activity icon

Started a new Conversation IMask With Livewire And Alpine

Hi folks,

I am trying to apply IMask js with livewire, which works fine with the following code:

<section class="px-4"
         x-data
         x-init=" IMask( $refs.mobile, { mask: '+{1} (000) 000-0000' }); "
>
<div class="form-group">
    <label class="control-label">Mobile # <x-required /></label>
    <input
            x-ref="mobile"
            wire:model.lazy="mobile"
            type="text"
            class="form-control @error('mobile'){{ 'border border-danger' }} @else {{ 'border border-success' }}@enderror"
            placeholder="(000) 000-0000"
    >
    @error('mobile')<div class="invalid-feedback" style="display: block;" role="alert">{{ $message }}</div>@enderror
</div>
</section>

This works fine, but the thing is I want to unmask it before I submit it to be able to process the unmasked value of the field (unless there is a bitter way).

And is there a solution for any package or just this one.

Thank you,

Activity icon

Replied to Livewire Mask Input

Where do you use wire:ignore, I am having the same problem here. how can I remove the close before I submit it, and how can I apply it again?

Feb
13
3 months ago
Activity icon

Replied to I Am Trying To Add A Family Holiday In Cmixin/business-day

OK, I noticed something not sure if you can help with:

The problem with '3rd-monday-after-02-01' => '= third Monday after 02-01' is that February 1st is Monday and the API is taking Third Monday AFTER 02-01 which catching February 22nd as the day we are looking for because it's not counting 02-01 as Monday because of the condition 'AFTER', so is there a way to say instead '3rd-monday-after-02-01' => '= third Monday starting 02-01'

Thank you,

Activity icon

Started a new Conversation I Am Trying To Add A Family Holiday In Cmixin/business-day

Hi, I am having a carbon.php in the config folder to have all the custom business holidays. Here is the file:

<?php

    return [
        'holidays' => [
            'region' => 'ca-on',
            'with' => [
                '2nd-sunday-after-05-01'    => null,
                '3rd-sunday-after-06-01'    => null,
                'easter'                    => null,
                'easter-p1'                 => null,
                'new-year'                  => '= 01-01 substitute',
                'day-after-new-year'        => '= 01-02 substitute',
                '3rd-monday-after-02-01'    => '= third Monday after 02-01',
                '07-01'                     => '= 07-01 if weekend then next Monday',
                'christmas-next-day'        => '= 12-26 if weekend then next Monday',
                'st-jean-baptiste-day'      => null,
                '06-24'                     => null,
            ],
        ],
    ];

This line '3rd-monday-after-02-01' => '= third Monday after 02-01', , I took it from AB file but when I added it and test if this coming Monday going to be a business day the answer was true, while it should be false

    $date = \Carbon\Carbon::parse('2021-02-15');
    $date = $date->isBusinessDay();
    dd($date);

Any idea how can I make sure that this coming Monday is not going to be a business day?

Thank you,

Dec
08
6 months ago
Activity icon

Replied to Prevent Queue From Trying In Case Of Fail

So, tries => 0 means try forever ?

Activity icon

Replied to Prevent Queue From Trying In Case Of Fail

So tries => 1 doesn't mean that it runs once and if it failed, it will try one more?

Activity icon

Started a new Conversation Prevent Queue From Trying In Case Of Fail

Hello,

I am running forge and horizon and I want the queue to run the job once and only once. No tries in case of failure at all. So, do I configure 'tries' => 1, or 'tries' => 0,.

I am having it as 'tries' => 0, but I noticed that when it fails, the log is having tons of tries and it keep looping forever.

So, does 'tries' => 0, means keep trying forever?

Thank you,

Dec
07
6 months ago
Activity icon

Awarded Best Reply on Select A Queue For A Listener

Here is the solution, I know that this issue is very old, but just for similar situations, I found the best solution is to add the following method to the Listener class:


    public function viaQueue()
    {
        return 'payments';
    }

It took me a while to be able to solve my problem.

Activity icon

Replied to Select A Queue For A Listener

Here is the solution, I know that this issue is very old, but just for similar situations, I found the best solution is to add the following method to the Listener class:


    public function viaQueue()
    {
        return 'payments';
    }

It took me a while to be able to solve my problem.

Activity icon

Replied to How Do I Add A Queued Listener (via "ShouldQueue") To A Named Queue?

Here it is, I know that this issue is very old, but just for similar situations, I found the best solution is to add the following method to the Listener class:


    public function viaQueue()
    {
        return 'payments';
    }

It took me a while to be able to solve my problem.

Activity icon

Replied to Select A Queue For A Listener

@braunson Thank you, I know that, but I am talking about a listener that needed to be queued to a specific queue. Is there a way to have that specific listener to be on a specific queue?

Activity icon

Started a new Conversation Select A Queue For A Listener

Hi,

I am having an event with listeners in app/ServiceProviders.php. The question is how can I make that listener runs in a specific queue.

I read that I can do the following:

class FetchBorrowersAccount implements ShouldQueue
{
    use Queueable;

    public $queue = 'payments';

to choose the queue payments, but it gave the following error:

[2020-12-06 21:35:32] production.ERROR: App\Listeners\FetchBorrowersAccount and Illuminate\Bus\Queueable define the same property ($queue) in the composition of App\Listeners\FetchBorrowersAccount. However, the definition differs and is considered incompatible. Class was composed {"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): App\Listeners\FetchBorrowersAccount and Illuminate\Bus\Queueable define the same property ($queue) in the composition of App\Listeners\FetchBorrowersAccount. However, the definition differs and is considered incompatible. Class was composed at /home/forge/portal.midtowncapital.ca/app/Listeners/FetchBorrowersAccount.php:10)

Although, it runs with the default queue default.

Thank you,

Activity icon

Replied to Crontab On Mac

Correct, but with Laravel 7, the best solution is what I did, which I am running at the moment in my Mac.

Thank you,