/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ApplicationRequestRequest $request)
 {
     $data = $request->all();
     $applicationRequest = new ApplicationRequest();
     $applicationRequest->fromArray($data);
     $applicationRequest->save();
     flash()->success("ADDED");
     session(['attribute' => \Lang::get('general.APPLICATION_REQUEST')]);
     return redirect($this->main_page);
 }
Exemplo n.º 2
0
 /**
  * @param ChildApplicationRequest $applicationRequest The ChildApplicationRequest object to add.
  */
 protected function doAddApplicationRequest(ChildApplicationRequest $applicationRequest)
 {
     $this->collApplicationRequests[] = $applicationRequest;
     $applicationRequest->setApplication($this);
 }
Exemplo n.º 3
0
 /**
  * Filter the query by a related \App\Models\ApplicationRequest object
  *
  * @param \App\Models\ApplicationRequest|ObjectCollection $applicationRequest the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildApplicationQuery The current query, for fluid interface
  */
 public function filterByApplicationRequest($applicationRequest, $comparison = null)
 {
     if ($applicationRequest instanceof \App\Models\ApplicationRequest) {
         return $this->addUsingAlias(ApplicationTableMap::COL_ID, $applicationRequest->getApplicationId(), $comparison);
     } elseif ($applicationRequest instanceof ObjectCollection) {
         return $this->useApplicationRequestQuery()->filterByPrimaryKeys($applicationRequest->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByApplicationRequest() only accepts arguments of type \\App\\Models\\ApplicationRequest or Collection');
     }
 }
Exemplo n.º 4
0
 private function sendSms($phone_number, $msg_text, $description, $application_id = null)
 {
     $applicationRequest = new ApplicationRequest();
     $applicationRequest->setApplicationId($application_id);
     $applicationRequest->setDescription($description);
     $applicationRequest->setResponse($msg_text);
     $applicationRequest->save();
     SendSms::Send($phone_number, $msg_text);
 }
 /**
  * Exclude object from result
  *
  * @param   ChildApplicationRequest $applicationRequest Object to remove from the list of results
  *
  * @return $this|ChildApplicationRequestQuery The current query, for fluid interface
  */
 public function prune($applicationRequest = null)
 {
     if ($applicationRequest) {
         $this->addUsingAlias(ApplicationRequestTableMap::COL_ID, $applicationRequest->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }