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

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!

LoadForge

Your banner here too?

Moderators

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.

© 2022 Laravel.io - All rights reserved.