예제 #1
0
 public function create(TableRow $row, array $input)
 {
     $v = Validator::make($input, $this->rule);
     if ($v->fails()) {
         $exception = new ValidationFailException('Valid failed.');
         $exception->setValidator($v);
         throw $exception;
     }
     $input['local_key'] = $row->column_name;
     $row->relationship()->save(new Relationship($input));
 }