Support the ongoing development of Laravel.io →
Database Eloquent Laravel
Last updated 1 year ago.
0
moderator Solution
public function profil(){
        return $this->hasOne(Profile::class);
    } 

If this is the real function name you miss the letter e on the end (profile and not profil) because of that you will get null from the result.

puneet1004 liked this reply

1

thank you. It took me long to figure out. and I forgot to close this discussion.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.