lperry65

lperry65

Member Since 4 Years Ago

Experience Points
7,750
Total
Experience

2,250 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
81
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
7,750 XP
Apr
09
1 month ago
Activity icon

Replied to Load Balancers

I fixed this by adding extra headers in the LB, here is my NGINX Script: /etc/nginx/conf.d/load-balancer.conf

upstream backend {
    least_conn;

    server x.x.x.x;
    server x.x.x.x;
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name mydomain.com www.mydomain.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name mydomain.com www.mydomain.com;

    ssl on;
    ssl_certificate /etc/ssl/certs/server.crt;
    ssl_certificate_key /etc/ssl/certs/server.key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    location / {
        proxy_pass http://backend;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host  $host;
        proxy_set_header X-Forwarded-Port  $server_port;
    }

    location ~ /\.ht {
        deny all;
    }
}

This fixed the mixed content issue and the site now renders correctly, however I'm still having an issue with Socialite and Google / Facebook login.

HTTP 500 Internal Server Error

Laravel\Socialite\Two\InvalidStateException

AbstractProvider->user()

/app/Http/Controllers/Auth/LoginController.php (line 108)

        // Get google user data
        $google = Socialite::driver('google')->user();
Apr
07
1 month ago
Activity icon

Replied to Load Balancers

I'm running on port 443 and forwarding from 80 as a 301

Activity icon

Replied to Load Balancers

It’s not a silly question, this is the first time I’ve done this and I’m open to suggestions. The only thing I’ve done with sessions it to configure both Laravel instances to use the same Redis server.

Activity icon

Replied to Load Balancers

Thanks for the reply, but I’m hosting this in house.

Apr
06
1 month ago
Activity icon

Started a new Conversation Load Balancers

I have a Laravel 7 APP with two instances behind an NGINX load balancer, I've set up Trusted Proxies as described in the Laravel docs but I don't think it's working . As soon as I click the login link the page appears but without any styling and there are also two network requests, one for http and a second for https which is from my redirect in the nginx conf. My understanding from the docs is that the Trusted Proxies middleware should take care of this !

A second issue I have is that although I have both Laravel instances using the same Redis server for session and cache, any Socialite login fails with an invalid state error and I'm not sure if this is related to trusted Proxies not working ?

Here is my trusted Proxies file

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var string|array
     */
    protected $proxies = [
        'x.x.x.x'
    ];

    /**
     * The headers that should be used to detect proxies.
     *
     * @var string
     */
    protected $headers = Request::HEADER_X_FORWARDED_ALL;
}

I've tested the Load balancer IP address and its accessible from both Laravel servers, and it's what I'm using in the protected $proxies array.

I don't have any of these issues if I just use one of the Laravel instances without the load balancer.

I've spent a couple of days on google trying to figure this out so any help much appreciated :)

Lee.

Apr
05
1 month ago
Activity icon

Replied to Https Links Not Being Generated

I'm happy this worked for you, but if feels more like a hack than a solution.

I'm having the same issue but I think your solution may be masking another issue with socialite. If anyone has multiple Laravel instances running behind a load balancer ( NGINX ) working with Socialite can you describe how you did it please.