Support the ongoing development of →
Database Eloquent Laravel
Last updated 2 years ago.
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


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


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.