The problem of how to use aliases in joined tables in Laravel

there is a data model file AppModelsPeople file, and the model file table name automatically sets the model table name according to the parameters of request. The name of the actual bound table is people_ [0-9]
how to join the table contact and how to specify the alias of the first table

\App\Models\People::select(["people_0".name, "people_0".tel])
->inner("contact as c", "c.user_id", "=", "people_0.user_id")
->where("people_0.state", "=", 1)
->where("c.tel", "=", "13011112222")
->first();

but for the table name people_0 is random, can you specify this model table alias, such as T1, so that other places can directly use where ("t.state", "=", 1)?

Jul.15,2022
Menu