tlodge

tlodge

Member Since 10 Months Ago

Experience Points
7,990
Total
Experience

2,010 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
7,990 XP
Feb
28
2 months ago
Activity icon

Started a new Conversation Displaying Multiple Laravel Queries In One Foreach Loop

I'm trying to query a database multiple times to then display the results in table. I've tried to merge the results but this doesn't seem to work in the for each loop.

What I'm trying to do is combine these in to a table where there is "user name" "weekly figures" "annual Figures" My two queries are:

    $annualfigures = DB::table("completedsales")
                        ->leftJoin('users', 'users.id', '=', 'completedsales.users_id')
                        
                        ->select('completedsales.users_id as users_id', 'users.name', DB::raw('SUM(completedsales.commission + completedsales.partnercommission + completedsales.mortcommission + completedsales.partnermortcommission) as takenpremium'))
                       
                        ->groupBy('users.name')
                        ->get();

$weeklyfigures = DB::table('completedsales')
                            ->leftJoin('users', 'users.id', '=', 'completedsales.users_id')
                            ->select('completedsales.users_id as users_id', 'users.name', 'completedsales.created_at', DB::raw('SUM(completedsales.commission + completedsales.partnercommission + completedsales.mortcommission + completedsales.partnermortcommission) as weeklypremium'))
                            ->whereBetween('completedsales.created_at', [$start_week, $end_week])
                            // ->groupBy('users_id')
                            // ->merge($users)
                            ->get();
Jan
22
4 months ago
Activity icon

Replied to NGINX SSL Set Up

Thanks for your help kbush.

Following your original reply saying the config looks ok, I spoke to the host. Apparently port 443 was closed on there end, so all my testing to see if the firewall had it open, etc didn't show anything up.

They opened it and now its working.

Jan
19
4 months ago
Activity icon

Replied to Best Way To Sway Clients Away From Using WordPress

I don't disagree, about any platform being slow and it isn't WordPress itself that is.

For an example this is what WordPress can do https://www.buildersociety.com/busolightning/

However I have seen some terrible Wordpress themes and plugins and I'd say the majority for sale are terrible.

It is difficult though suggesting the best route without knowing the job spec, WordPress might be perfect and a good developer could really make a good WordPress site.

Activity icon

Replied to NGINX SSL Set Up

Nothing stands out in the error logs, unless I'm looking at the wrong ones. Which would you recommend looking at?

Activity icon

Replied to Best Way To Sway Clients Away From Using WordPress

Coming from an affiliate marketing background, I can see both sides of this.

For a website you want to sell in the future, wordpress is up there with the best as it is so well known buyers will pay more for a wordpress site.

However from the other end, it can be very slow. Normally because of bad themes and overloaded with plug ins. Speed can make a huge difference to conversion ratios.

Without knowing what you're building a flat file cms like pico could be a recommendation or use your skills to build a fast wordpress site.

Activity icon

Started a new Conversation NGINX SSL Set Up

Trying to add a SSL certificate to a site, it was working before the SSL but now trying to connect it times out. My nginx conf file is

    listen 80 default_server;
    listen [::]:80;

    server_name gpsuk.net;

    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    # Webroot Directory for Laravel project
    root /var/www/html/laravel/public;
    index index.php index.html index.htm;

    server_name gpsuk.net;

#    ssl on;
    ssl_certificate /etc/nginx/ssl/gpsuk_net/ssl-bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/gpsuk_net/gpsuk_net.key;

    ssl_session_timeout  1d;
    ssl_session_cache    shared:SSL:50m;
    ssl_session_tickets  off;

    ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers  on;
    ssl_dhparam                /etc/nginx/ssl/dhparam.pem;

    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
        #ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';

    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling         on;
    ssl_stapling_verify  on;

    add_header Strict-Transport-Security max-age=15768000;
    
    # Log files for Debugging
    access_log /var/log/nginx/laravel-access.log;
    error_log /var/log/nginx/laravel-error.log;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

   
    #       include snippets/phpmyadmin.conf;
    include /etc/nginx/snippets/phpMyAdmin.conf;

    # PHP-FPM Configuration Nginx
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
}
}