Orm obtains the attribute values in the join table, and the attribute values in the orm table. The orm obtains the attribute values in the join table. the EloquentORM in the orm relational object model laravel is used to interact with data tables. each database table obtains the attribute values in the join table with the corresponding "model ORM, attribute values in the orm table
ORM-relational object model
The Eloquent ORM in laravel is used to interact with data tables. each database table interacts with a corresponding "model". For more information, see the official documentation or Baidu. The code for getting the attribute values in the join table is as follows:
/*** [GetContactAttribute get seller contact] */public function getContactAttribute () {return $ this-> hasOne ('app \ Http \ Models \ Supplier ', 'supplierid ', 'supplierid')-> first ()-> contact ;}
The Eloquent ORM in laravel is used to interact with data tables. each database table corresponds to a corresponding "model...