/** * 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(); }
public function onRun() { $this->testimonials = Testimonial::where('is_allowed', '=', true)->get(); }