setRelations() public static method

Setup multi relations
public static setRelations ( string $modelOne, string $modelTwo, array $relations ) : void
$modelOne string
$modelTwo string
$relations array
return void
Exemplo n.º 1
0
 /**
  * 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]);
 }