Esempio n. 1
0
 public function post_index()
 {
     if (!DonationForm::is_valid()) {
         return Redirect::back()->with_input()->with_errors(DonationForm::$validation);
     }
     $new_donation = Donation::create(Input::get());
     if ($new_donation) {
         return Redirect::to_action('donations');
     }
 }
Esempio n. 2
0
 /**
  * undocumented function
  *
  * @return void
  * @author 
  **/
 public static function addNew(array $input)
 {
     return Donation::create($input);
 }
Esempio n. 3
0
 /**
  * Simple function to create a donation associated with this Registration
  *
  * @param array $data
  * @return Donation
  */
 public function createDonation($data)
 {
     $donation = new Donation($this->client, $data, $this->event, $this);
     $donation->create();
     $this->setDonation($donation);
     return $donation;
 }