Eshop-Laravel/app/Message.php

21 lines
468 B
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DB,Session;
class Message extends Model
{
static public function save_msg($data){
$message = new self();
$message ->name = $data['name'];
$message ->last_name = $data['last_name'];
$message ->email = $data['email'];
$message ->message = $data['message'];
$message -> save();
Session::flash('sm' , $data->name . ' Thank You For your message, we\'l talk soon ! ');
}
}