Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

alunr

alunr

Member Since 3 Years Ago

Experience Points
8,140
Total
Experience

1,860 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
76
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.

Level 2
8,140 XP
Sep
30
1 month ago
Activity icon

Replied to Comparing 2 Collections

Ideally I'll just get a new collection with all the records that don't match. Then I can process the changes as required depending. It's 100% pull from their API for the product listing so hopefully we will only find new or changed records!

Activity icon

Replied to Comparing 2 Collections

I'm using keyBy() on both collections so we have the same Key for each record.

I then need to check lastModifiedOn on each collection.

Activity icon

Started a new Conversation Comparing 2 Collections

Hi All,

The Problem: I need to check if an API contains any changes to my local dataset.

I have the data currently as 2 collections.

1 is created from an external API as an array that I am turning into a collection using collect($response['products']) it also has a number of fields I'm not interested in.

The other is my local products table created using Eloquent ( Product::get() )

I can rekey the API Array with the unique ID and then check on each item individually but there feels like there might be some clever collection function I could use instead?

Help will be much appreciated as this is something I bump into quite a lot!

Thanks

Sep
21
2 months ago
Activity icon

Started a new Conversation Adding A TEAM Member Who Already Has A Laracasts Account

I've just upgraded to Teams and one of my staff already has his own personal account. How do I get him into my team with all his existing history?

Sep
08
2 months ago
Activity icon

Replied to What's The Convention In Laravel For Getting Data From External APIs

BTW I found this which 95% answers my question except where this class needs to reside and if it can be created from Artisan commands.

https://laravel-news.com/wordpress-api-with-laravel

Activity icon

Started a new Conversation What's The Convention In Laravel For Getting Data From External APIs

Hi All,

Coming from Codeigniter land we used to use a lot of Custom Libraries to pull data from external APIs such as internal systems and so forth. As such we never needed to go as far as building a package etc as a) that's a bit beyond me at the moment and b) they were never going to be public APIs.

Now I'm starting to rebuild some of my apps into Laravel (at last!) what's the prefered methodology for paakinging up a bunch of HTTP Client requests into a simple to use class so I can just call $CustomerClass->getProducts(); etc ideally as a collection!

Sorry for the basic question but once I've got a handle on where I need to build this functionality I'm sure Laravel is going to make my life a breeze!

Thanks

Jun
05
5 months ago
Activity icon

Replied to CURL Domain Name Not Found Valet

Did anyone manage to resolve this? I've got a pretty vanilla Macbook on Catalina running valet.

If my laravel ( portal.test) project tries to call myapi.test using ZTTP I get cURL error 6: Could not resolve: myapi.test (Domain name not found) (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

myapi.test works fine in Chrome.

IF I change my DNS to 127.0.0.1 then I lose my internet connectivity unless I hardcode a local DNS server

May
25
5 months ago
Activity icon

Replied to Where HasManyThrough

Super star! Thank you, It's starting to make sense now!!

May
24
5 months ago
Activity icon

Started a new Conversation Where HasManyThrough

Following on from the excellent reply I received the other night to https://laracasts.com/discuss/channels/eloquent/filter-results-based-upon-belongstomany-values

I have numerous EVENT with numerous TEAMS associated with them. Within those TEAMS we have PEOPLE with different SKILL

EVENT > hasMany TEAM (event_team) TEAM > hasMany PERSON PERSON > hasMany SKILL

I need to get all the EVENT where we had a certain skill available EG "first-aid"

I'm trying to write it as a Scope so I can utilise this in my API which might be where I am having difficulties having following what is going on here: https://laravel.com/docs/7.x/eloquent-relationships#querying-relations

I thought the following would work but I get a PHP error:

Event Model

public function people()
{
    return $this->hasManyThrough('App\Person', 'App\Team');
}

public function scopeSkill($query, $slug)
{
    $query = $query->team()->people()->where('slug', $slug);
    return $query;
}

Call to undefined method Illuminate\Database\Eloquent\Builder:team() which I assume means I need to access the existing query in a different way.

I feel like I'm just not "getting" Eloquent at the moment :(