luis_carlos

luis_carlos

Member Since 2 Years Ago

Cascavel

Web Developer at Focus Concursos

Experience Points 27,640
Experience Level 6

2,360 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 275
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.

02 Apr
3 months ago

luis_carlos left a reply on Returning String Data From A Relationship Only

Did you trying using select()?

$ext = Extension::where('extension', $extension)->with('hasType')->select('path')->first();
$path = $ext->path;
01 Apr
3 months ago

luis_carlos left a reply on Foreach Paginate Pages Laravel

To show pagination, put this in your view, where you want display pagination links

{{ $posts->links() }}

luis_carlos left a reply on Getting 500 Error JQuery

Try this steps:

  1. Check your url accessing it using your browser. Replace manually the variables url_origin and guestId on url_origin + '/reservations/get-preference/' + guestID;

  2. Wrap your function call in a domready event, like @cronix suggested.

  3. Put a debugger at the beginning of your function and debug it.

function managePreference(){
    debugger
        var guestID = $('#guest_id_holder').data('id')
....

luis_carlos left a reply on Import Csv File Into Database Without Database Matching Fields

If you need some extra field to fulfill your Registration model, you can put it on your csv file and read inside foreach loop, just like the other fields. In the other hand, if you need fulfill other fields in Registration model and you doesn't have it on your csv file, you can assign it's directly inside for loop.

foreach ($data as $key => $value) {
    $import = new Registration();
    $import->city = $value->city;
....
    $import->other_field = "some value";    
    $import->other_strange_field = "some strange value";
}

luis_carlos left a reply on After Sending Mail. On Click On Button Return False

Probably there's some javascript blocking with preventDefault() after onclick event. Can you show us the code executed on that event?

luis_carlos left a reply on Problem With Mail Verification

As @narcisonunez21 said, you need change gmail security settings to allow your app send mails.

Here a tutorial that can help you. https://learninglaravel.net/learn-to-send-emails-using-gmail-and-sendgrid-in-laravel-5

luis_carlos left a reply on Getting 500 Error JQuery

I guess this error 500 is related to your server, and not your script, normally something is wrong with configurations.

This undefined could be one of two things:

  1. your selector can't find dom element and so can't get data-id value, or;
  2. data-id value doesn't exists in element.

If you could show more of your context, like you code, I think it will be more easy to help.

luis_carlos left a reply on Solid Principles

@kel_ answer is great when he say that is to think in terms of functionality.

Single responsibility is all about your class or function solve one, and just one, problem.

It's common a class get bigger and bigger as you put behavior on it, or put some extra responsibilities that you need, like store and recover data (Laravel Models does), do login, recover user password, and at this time you are breaking the S in SOLID.

If your class should attend in various contexts, each context can be a class. Using a User class as example, it can be used in authentication context, or recover password context, or interact with other users in a forum. As you can see, each context is a different and should be treated separately.

Your PostsController can be one for all CRUD statements, because this is what they do, allow you to store and retrieve records. If you need comments on your posts, you should create another controller to do that, because it is another context, another resource.

Now imagine a situation where you need that posts must be approved to go online, or after approved it can the disapproved, in this case you should create another controller and keep things separated.

Here 02 lessons that can help you https://laracasts.com/series/solid-principles-in-php/episodes/1 https://laracasts.com/series/whip-monstrous-code-into-shape/episodes/16

04 Feb
5 months ago

luis_carlos left a reply on Group Chat

Two years ago I found myself at the same situation and I ended up developing a solution using Redis Pub Sub with Node JS. Here a link to an article with more info about the idea, https://medium.com/@ridwanfajar/using-redis-pub-sub-with-node-js-its-quite-easy-c9c8b4dae79f