/**
  * Saves form post values from Testimonial Form to Database
  *
  * @param name ,message
  */
 public function onTestimonialSubmit()
 {
     $name = post('name');
     $message = post('message');
     $testimonial = new Testimonial();
     $testimonial->name = $name;
     $testimonial->message = $message;
     $testimonial->save();
 }
Esempio n. 2
0
 public function onRun()
 {
     $this->testimonials = Testimonial::where('is_allowed', '=', true)->get();
 }