bmonteiro

bmonteiro

Member Since 2 Years Ago

Experience Points 3,690
Experience Level 1

1,310 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 32
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

18 Apr
2 years ago

bmonteiro left a reply on Get A Nested Relationship

$event->modatalies-> modality_prices-> enrollments[`username'] doesn't work because modalities, modality_prices are collections

bmonteiro left a reply on Get A Nested Relationship

With a Has Many Through I can access modality_prices like

public function modality_prices() { return $this->hasManyThrough('App\ModalityPrice', 'App\Modality'); } Than

$event->modality_prices

But not $event->enrollments. That's my 2 days question =)

I get it using like: `` // App\Modality

public function enrollments() { return $this->hasManyThrough('App\Enrollments', 'App\ModalityPrice'); } ``

`` // App\Event public function getEnrollmentsAttribute() { $modalities = $this->modalities()->has('enrollments')->with('enrollments')->get();

return collect($modalities->pluck('enrollments'))->collapse()->unique();

} ``

But I think this is not the ideal of relationships. I think might have a solution like:

// App\Event public function enrollments() { return $this->modalities()->modalities_prices()->enrollments; }

17 Apr
2 years ago

bmonteiro started a new conversation Get A Nested Relationship

Hi,

I'm confused how to get a nested relationship. Lets take a example:

I have 4 tables: ``events

  • id
  • name ``

``modalities

  • id
  • event_id
  • name ``

``modality_prices

  • id
  • modality_id
  • amount ``

``enrollments

  • id
  • modality_price_id
  • username ``

How can I get $event->enrollments ?

Thanks!

11 Apr
2 years ago

bmonteiro started a new conversation Queue On Event Listener Or On Notification?

Hi,

Where is the best place to queue a action, on a Event Listener or Notification?

A Example: I have a event (OrderCreated) wich have multiple listeners (BillUserListener, CreateInvoiceListener and SendInvoiceListener).

In SendInvoiceListener I have a call to send a notification

$user->notify(new InvoiceNotification($order));

Is better put a queue on SendInvoiceListener or on InvoiceNotification?

Thanks!

bmonteiro left a reply on How To Specify Queue Name In Event Listeners

Look a simple solution here: stackoverflow ????????

22 Mar
2 years ago

bmonteiro started a new conversation Overhead On Request Input

What is the best way to get a input from request on controller?

$request->attribute; vs $request->input('attribute'); vs Request::input('attribute');

I think using the function ones I get more overhead, right?

thanks

17 Feb
2 years ago
19 Jan
2 years ago

bmonteiro left a reply on Old() Function Sharing Same Input Name

with this approach I have to change the controllers to handle the renamed input to be the same of database. more minutes...

bmonteiro started a new conversation Old() Function Sharing Same Input Name

Hi,

I have a company form with a input with value old('name').

But i have a modal with another form, like a product form, with a input with the same old('name') value.

I submit the modal form and validator gets fail, then redirects the user with withInputs() and withError().

If the 'name' input failed, the old() puts the old value in both inputs.

How can i bypass this?

Tks B.

24 Nov
2 years ago

bmonteiro left a reply on Get The Route URI With Parameters "{id}" String?

But I want with the "{}" parameters... in this case i want exactly:

"/users/{id}"

bmonteiro started a new conversation Get The Route URI With Parameters "{id}" String?

HI,

How can i get the route uri as string with the parameters {id} ?

Like //domain.com/users/{id}

Thanks

01 Sep
2 years ago

bmonteiro left a reply on [5.3] Auth Reset Password W/ Email Error

@weliang in this case, is not better use $request->input('email') ?

31 Aug
2 years ago

bmonteiro started a new conversation [5.3] Auth Reset Password W/ Email Error

Hi,

On ResetController I insert the ResetsPasswords trait. If user enter in /password/reset/{token}, this method will be executed:

/**
     * Display the password reset view for the given token.
     *
     * If no token is present, display the link request form.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  string|null  $token
     * @return \Illuminate\Http\Response
     */
    public function showResetForm(Request $request, $token = null)
    {
        return view('auth.passwords.reset')->with(
            ['token' => $token, 'email' => $request->email]
        );
    }

I'm not understanding why have the 'email' => $request->email on the with() function. Where request get the e-mail of the user? Here, a error is shown, because $request don't have this attribute.

Thanks a lot

24 Aug
2 years ago

bmonteiro started a new conversation [Laravel 5.3] Change /login Auth Redirection

Hi,

How can I change the path of /login for log users? In Laravel 5.2, AuthController is present, but in 5.3 is deprecated. My login page is /enter

Insert this in route file is ok, but when i access a restrict page, laravel redirect to /login.

Thanks!

10 Aug
2 years ago

bmonteiro started a new conversation [Laravel 5.3] Error On Gulp Execution

Hi,

I have installed laravel 5.3 with composer create-project laravel/laravel project dev-develop

then run npm install

then run gulp

and get this error: 17:18:36] Using gulpfile /private/tmp/project/gulpfile.js [17:18:36] Starting 'all'... [17:18:36] Starting 'sass'... [17:18:37] Finished 'sass' after 1.71 s [17:18:37] Starting 'webpack'... { [Error: Entry module not found: Error: Can't resolve 'buble' in '/private/tmp/project' resolve 'buble' in '/private/tmp/project' Parsed request is a module using description file: /private/tmp/project/package.json (relative path: .) after using description file: /private/tmp/project/package.json (relative path: .) resolve as module module variation buble-loader /private/tmp/node_modules doesn't exist or is not a directory /private/node_modules doesn't exist or is not a directory

Someone know how to fix it?