Example #1
0
 /**
  *  Add soft deletes to the migration
  *
  * @return string
  */
 protected function addSoftDeletes()
 {
     $content = "";
     if ($this->model->hasSoftDeletes()) {
         if (!$this->tableHasColumn("deleted_at")) {
             $this->columnsChanged = true;
             array_push($this->columnsAdded, "deleted_at");
             $content = "\t\t\t" . $this->setColumn('softDeletes', null) . ";\n";
         }
     }
     return $content;
 }