/**
  * Return all records including those that have been soft deleted 
  *
  *
  * @return OnlineForm
  */
 public function all()
 {
     return OnlineForm::withTrashed();
 }
Exemple #2
0
 /**
  * Check against a form request using the user information if it's for receiving for the logged in user
  *
  * @param int $id
  * @return boolean
  */
 public function isForReceiving($formID)
 {
     $online_form = OnlineForm::withTrashed()->where('id', $formID)->firstOrFail();
     if ($this->getFinanceDepartmentAttribute() && $online_form->forReceiving()) {
         return true;
     } else {
         return false;
     }
 }