Esempio n. 1
0
 /**
  * Seed the database with the errors provided
  * 
  * @author Victor Cruz <*****@*****.**>
  * @param array $errors     Errors array
  *
  * @return void
  */
 public function seed(array $errors)
 {
     //Delete previous errors rows
     $this->deleteRows();
     foreach ($errors as $error) {
         $error['error_code'] = $this->error_start_code . $error['error_code'];
         $error['created_at'] = date('Y-m-d H:i:s');
         Error::create($error);
     }
 }