narcisonunez21

narcisonunez21

Member Since 2 Years Ago

Dominican Republic

Software Engineer at Vivial

Experience Points 46,130
Experience Level 10

3,870 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 458
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.

12 Jun
5 days ago

narcisonunez21 left a reply on Filter Data

@MARLONV - You can pass a clousure as the second argument and there you can debug and apply the required filter.

->whereHas('children.events', function ($q) {
            $q->where('baz', 'bam');
        })

narcisonunez21 left a reply on Filter Data

$user = User::whereId(Auth::id())->with('children.events')->whereHas('children.events')->firstOrfail();

You can use whereHas('children.events'). Remember also to call the ->with(). the last one will gives you the records but with will eager load the relationships

04 Apr
2 months ago

narcisonunez21 left a reply on Problem With Mail Verification

It's gmail security that is causing that.

Try setting up mailtrap that is really simple to get started.

01 Apr
2 months ago

narcisonunez21 left a reply on Problem With Mail Verification

@eloi if you are not seeing any errors or the app doesn't crash, check your spam folder to validate

narcisonunez21 left a reply on Problem With Mail Verification

storage/logs open the file and try to send an email again

narcisonunez21 left a reply on Problem With Mail Verification

The first thing you need to do is check your logs to see what's happening and why the email was not sent.

Check the gmail privacy/security section to allow less secure app access.

narcisonunez21 left a reply on Can Not Use Variable Outside Of If Statement

Can you paste the specific error?

11 May
1 year ago

narcisonunez21 left a reply on Send An Email As A Reply Like When We Click The "reply" Button

Just to leave a record about how i did it. In your mailable class

/**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $mails = MailTracking::where('project_id', $this->projectId)->orderByDesc('created_at')->get();
        $projectName = Project::find($this->projectId)->order->name;

        $this->withSwiftMessage(function ($message) use ($mails){
            if ($mails->count()) {
                $lastEmail = MailTracking::where('project_id', $this->projectId)->orderByDesc('created_at')->first()->message_id;
                $historyEmails = $mails->implode('message_id', '');

                $message->getHeaders()->addTextHeader('In-Reply-To', $lastEmail);
                $message->getHeaders()->addTextHeader('References', $historyEmails);
            }

            MailTracking::create([
                'project_id' => $this->projectId,
                'message_id' => explode(' ', $message->getHeaders()->get('Message-ID')->toString())[1]
            ]);

        });
    // RE: is required if is a reply for outlook 
        if ($mails->count()) {
            $this->subject('RE: ' . $projectName);
        } else {
            $this->subject($projectName);
        }
        $this->view('mails.client-feedback-given');
        return $this;
    }
10 May
1 year ago

narcisonunez21 left a reply on Send An Email As A Reply Like When We Click The "reply" Button

The feedback is given by email or on your website ? -. From my website

with "as a reply" i mean that there is just one email in the inbox with the RE: ...

if you are suggesting to create another brand new email with the last email content inside, thats not what i want.

narcisonunez21 started a new conversation Send An Email As A Reply Like When We Click The "reply" Button

Hello everyone,

The case:

I'm sending an email to the user to request a feedback about something and when the user gives me a feedback i need to send a copy to the user as a reply for the last feedback required email.

How can i do that?

Note: best if using Mail:: facade :D

10 Apr
1 year ago

narcisonunez21 left a reply on Eloquent Duplicated Statements

Thank you so much. Thats solve the "problem"

narcisonunez21 started a new conversation Eloquent Duplicated Statements

Hello community,

I have a view taking so long to render (like 7-10 seconds)

In the view i just sending the

$users = User::active()->get(); the active scope just do this: $query->where('status', 1);

In the view i just requesting 2 relations: $user->position->name and $user->team->name.

I think this takes a lot to load and i saw the message:

I'm using debugbar and i found this in queries: 246 statements were executed, 240 of which were duplicated, 6 unique.

There is any way to fix this

10 Feb
1 year ago

narcisonunez21 left a reply on /app\models Directory Does Not Exist.

I found the issue. My problem was that I have a GlobalModelObserver class to help me track every create, edit, delete action in the system.

$models = \File::allFiles(app_path() . '\models');

The problem here is that \models works well on windows but on unix based system it crash. Just change to $models = \File::allFiles(app_path() . '/models');

I didn't notice this because was failing while laravel is bootstrapping all the service providers and thats makes it harder to find.

Thanks for your help

narcisonunez21 started a new conversation /app\models Directory Does Not Exist.

Hello community,

I'ma getting the next error with any php artisan command:

In Finder.php line 539:

The "/Users/username/Sites/project/app\models" directory does not exist.

But just o *unix based systems. I was working without problems on windows.

Things that I already did:

Check all the namespace into my App/Models folder (All correct) Check all the "use" are using the correct namespace (All Correct) Check composer file and verify that classes are being correct placed into autoload (All of them have the App\Models\.. well)

Can someone help with this.

Thanks

narcisonunez21 left a reply on - Laravel/framework V5.4.9 Requires Ext-mbstring * -> The Requested PHP Extension Mbstring Is Missing From Your System.

You need to go to the php.ini file and remove the ; placed before the extension

23 Jan
1 year ago

narcisonunez21 left a reply on Add Data To Request Object Within A Middleware

That's the way provided by the framework and its the best way i always use until now.