M
M
MOK4SS2020-10-17 22:09:43
Laravel
MOK4SS, 2020-10-17 22:09:43

How to get the number of points for a user from another table via his steamid?

There is a users table and the steam2 field in it (the user's steamid is stored in it)
There is a Store table, in it the steamid is stored in the auth field. There is also a 3rd field, (points) it stores user points.
I read the information on the internet but everyone writes differently. In the end, I got confused.
The only thing I understood:

public function Store()
    {
        return $this->hasOne(Store::class);
    }

public function User_shop()
    {
        return $this->hasOne(User::class);
    }


Therefore, please help me write the code, I need to get the number of user points through steamid.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question