protected Protected is this $user_id. You can call it but you cannot assign it to change it. and public (representing public), and one called private, the first two of which can be inherited
replySince it needs to be associated with the user table of the database in order to be added, TP5 has already done the processing internally and only needs to create a new application/index/model/User.php file. Did he say that he should go to TP5 to handle it himself?
$pk here defines the primary key of the model associated with the data table
protected Protected is this $user_id. You can call it but you cannot assign it to change it. and public (representing public), and one called private, the first two of which can be inherited