meduz

Member Since 4 Years Ago

Belgium

Front-end developper at Belgium

Experience Points 4,960
Experience Level 1

40 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 63
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.

10 Jul
1 month ago

meduz left a reply on 5.2 - Password Reset For Multiple Tables

Thanks @adamtomat!

I used a similar approach for an app where users are created from Laravel Novas dashboard.

If someone thinks its wrong, please let me know.

/* In config/auth.php */

<?php

return [
   // lot of stuff before…

    'passwords' => [
        'users' => [
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 60,
        ],
        'new_users' => [ // the configuration for new users
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 10080, // 7 days (60 * 24 * 7)
        ],
    ],
];

/* In app/Observers/UserObserver.php */

<?php

namespace App\Observers;

use App\User;
use App\Mail\UserCreatedMessage;
use Illuminate\Support\Facades\Mail;

use Password;

class UserObserver
{
    public function created(User $user)
    {
        $token = Password::broker('new_users')->getRepository()->create($user);
        Mail::queue(new UserCreatedMessage($user, $token));
    }
}

20 May
3 months ago
16 May
3 months ago

meduz left a reply on Should Forge + Digital Ocean Users Care About MDS/ZombieLoad Intel Vulnerability

I asked Saïd and Taylor on Twitter. Saïd answered me that Forge already performs these updates, if I correctly understand.

15 May
3 months ago

meduz started a new conversation Should Forge + Digital Ocean Users Care About MDS/ZombieLoad Intel Vulnerability

Hi,

Following last Intel mess, Digital Ocean recommends to update the Kernel of their droplets.

As a non-very-server-savvy guy, I’m wondering if it’s something that…

  • … should be done;
  • … can be done safely and without breaking anything (app running on it and Forge features);
  • … is supposed to be handled by the Laravel Forge team automatically regarding its exceptional character.

Any opinion or insight?

Thanks!

13 May
3 months ago

meduz left a reply on Laravel 5.7 Session Not Maintained While Using Subdomains

Just encountered the same problem in Laravel 5.8 with SESSION_DOMAIN=*.my-domain.tld in the .env file. Here’s how I solved it:

For local environment where SESSION_DRIVE=file

  • remove the asterisk in this SESSION_DOMAIN value (so it’s now `.my-domain.t);
  • manually delete the content of storage/framework/sessions.

For production environment where SESSION_DRIVE=redis

  • remove the asterisk in this SESSION_DOMAIN value (so it’s now `.my-domain.t);
  • clear all the things (php artisan config:clear, php artisan cache:clear);
  • also regenerated the app key (not sure it’s however useful);
  • restart Nginx and PHP.
02 May
3 months ago

meduz started a new conversation SSL Auto-renewal Failing On Redirected Domains

Hi all,

My company has a Forge server only used for domain redirections. In Forge interface, it means that sites on this server don’t host any app, but are only filled with one redirect ( / to https://otherdomain.tld).

When comes the time for Let’s Encrypt auto-renewal (to renew the redirected domain certificate), the process fails as Let’s Encrypt bot is trying to query a URL ( .well-known/blabla ) that ends up being redirected like the whole domain.

So… I don’t know if it’s a feature not supported by Forge or if the problem lies somewhere else.

I think the following Nginx settings are loaded (not sure of the order, however):

In before/ssl_redirect.conf:

# Redirect every request to HTTPS...
server {
    listen 80;
    listen [::]:80;

    server_name .MYDNS.TLD.be;
    return 301 https://$host$request_uri;
}

In mytld.conf

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/MYDNS.TLD./before/*;

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name MYDNS.TLD.;
    root /home/forge/MYDNS.TLD./;

    # FORGE SSL (DO NOT REMOVE!)
    ssl_certificate /etc/nginx/ssl/MYDNS.TLD./540731/server.crt;
    ssl_certificate_key /etc/nginx/ssl/MYDNS.TLD./540731/server.key;

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;

    # FORGE CONFIG (DO NOT REMOVE!)
    include forge-conf/MYDNS.TLD./server/*;

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

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/MYDNS.TLD.-error.log error;

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/MYDNS.TLD./after/*;

In server/redirect_rules.conf:

# Laravel Forge Redirect Rule 26978
rewrite / https://MYTARGETDNS.TLD redirect;

In server/letsencrypt_challenge.com:

location /.well-known/acme-challenge {
auth_basic off;
allow all;
alias /home/forge/.letsencrypt;
}

Also, my Nginx abilities are limited (front-end developer, here).

01 Mar
2 years ago

meduz left a reply on Laravel 5: CORS Headers With Filters

Update: I'll update my post in a few seconds. Seems like my brain has freeze a bit today. ~~

meduz left a reply on Laravel 5: CORS Headers With Filters

Update : I just noticed my form action attribute was absolute URL instead of relative. I'm gonna show myself the way out, thanks for your attention. By the way, maybe is my question about wilcard safety still relevant.

Hi!

I read the whole thread. Some question regarding the subject of CORS /w local development. My back-end experience is limited, I'm a front-end guy.

When working locally with a proxy (e.g. BrowserSync allowing you to access yourwebsite.dev through _localhost:3000_), my current solution looks a bit filthy: in the Laravel .env file, I added a APP_URL_CORS const set to * for the local development .env file, and set to yourwebsite.dev for other cases (production, staging, whatever…).

Then, I add this to every AJAX request:

return response()
    ->json($things_for_the_browser)
    ->header('Access-Control-Allow-Origin', env('APP_URL_CORS'));

This works, but looks a bit crappy to me.

I understand your solution, but isn’t it a bit unsafe to allow every origins with the wildcard? Or did I miss something?

Thanks!