rpd

rpd

Member Since 2 Years Ago

Experience Points
11,060
Total
Experience

3,940 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
91
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 3
11,060 XP
Sep
30
3 weeks ago
Activity icon

Awarded Best Reply on Auto-login After Registration Issue

Ah, I found the solution.

The primary key for my users table is not auto-incrementing so I needed to set

public $incrementing = false;

in my User model. (It's specified here in the docs)

Now the user is logged in immediately after registration :)

Activity icon

Replied to Auto-login After Registration Issue

Ah, I found the solution.

The primary key for my users table is not auto-incrementing so I needed to set

public $incrementing = false;

in my User model. (It's specified here in the docs)

Now the user is logged in immediately after registration :)

Sep
28
3 weeks ago
Activity icon

Replied to Auto-login After Registration Issue

Here are the changes I made:

In config/fortify.php:

'username' => 'username', 'email' => 'email', and I enabled Features::emailVerification()

In models/user.php:

class User extends Authenticatable implements MustVerifyEmail
{
    use HasFactory, Notifiable;

    protected $primaryKey = 'user_id';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
      'user_id',
      'user_type',
      'username',
      'email',
      'password',
    ];

    // ... 

And obviously I updated my login/registration forms to include a username input

Sep
24
4 weeks ago
Activity icon

Started a new Conversation Auto-login After Registration Issue

I am creating a registration process where, after registering, I'd like a user to verify their email before they can continue. In theory, Fortify should automatically login a user after registration, redirect them to the /dashboard route but then display the verify-email view if the user's email is not verified.

However, what I'm finding is that the user is not being logged in automatically so when trying to access the dashboard page it instead redirects to the login, and I can't work out why.

I tried a dd(Auth::user()) within the store method inside the RegisteredUserController after $this->guard->login($user); and it is returning a logged in user, however somewhere between there and the dashboard page I guess it's not retaining that.

If I do proceed to log in, everything works perfectly, it's just not logging in automatically for me.

I suspect it may be because I've set the user to login using a username rather than email, although I believe I have updated that appropriately in the fortify config file.

Have spent hours scratching my head over this one, any suggestions? Thanks!

Activity icon

Replied to Before Insert Triggers With Laravel & Jetstream

Thanks @alanholmes ! Got it working and that solution is much more straightforward 😅

Sep
16
1 month ago
Activity icon

Started a new Conversation Before Insert Triggers With Laravel & Jetstream

I'm new to Laravel and just got started with Laravel 8. I'm working with the Jetstream auth scaffolding and right now customising the user registration page.

What I need to do before creating a new user is to create a record on a parent 'entity' table and return the entity_id of that record, so I can use it to create a record on the users table.

I've seen that with Laravel we can use a booted() function in our model to trigger on certain events, however I'm at a loss as to how to get this to work.

I've tried putting a booted function in the User.php model and the app/Actions/Fortify/CreateNewUser.php model but neither seems to do anything.

I'm also unsure as to the best method for returning the new entity_id once it is persisted. I'd have to write a DB::unprepared rather than use the Entity::create method?

Thanks!

Aug
23
1 month ago
Activity icon

Commented on Advanced Search With Laravel Scout

Is it possible to override the default table name and primary key name globally? For example, if your PKs are always named <table_name>_id or your table names were always singular not plural

Activity icon

Commented on Build The Explore Users Page

So the setPasswordAttribute() method is another one of Laravel's fancy tricks? We don't have to actually call it anywhere?

Activity icon

Commented on File Storage And Custom Avatars

I'm totally new to this concept of symlinks, can someone give me the low down on what the purpose or reason for this is?

Aug
21
2 months ago
Activity icon

Commented on File Storage And Custom Avatars

I've been noticing this throughout the series. Does anyone know of a similar package for Atom?

Aug
16
2 months ago
Activity icon

Commented on Service Container Fundamentals

Glad I'm not the only one! This lesson went straight over my head

Jun
24
3 months ago
Activity icon

Replied to Update Laravel

In case anyone else should have this issue in the future, here's what worked for me

brew update

brew install [email protected]

brew link [email protected] --force

Jun
23
3 months ago
Activity icon

Commented on The Laravel Installer

How does this work in terms of different Laravel versions? Do I only need to install Laravel once and then when I create a new project it uses the latest version of Laravel?

Jun
10
4 months ago