setRelations() 공개 정적인 메소드

Setup multi relations
public static setRelations ( string $modelOne, string $modelTwo, array $relations ) : void
$modelOne string
$modelTwo string
$relations array
리턴 void
예제 #1
0
파일: Table.php 프로젝트: bluzphp/framework
 /**
  * Setup relation "many to many"
  * [table1-key] [table1_key-table2-table3_key] [table3-key]
  *
  * @param  string $model
  * @param  string $link
  * @return void
  */
 public function linkToMany($model, $link)
 {
     Relations::setRelations($this->model, $model, [$link]);
 }