我无法创建此表
public function contact_email(Request $request)
{
$data['name'] = $request->name;
$data['email'] = $request->email;
$data['mobile'] = $request->mobile;
$data['message'] = $request->message;
Mail::send('email-view', ['data' => $data], function ($message) {
$message->to(env('MAIL_USERNAME'))->subject('Contact Us Email Notification!!');
});
return redirect()->back();
}
答案 0 :(得分:0)
在这里看看:
https://dev.mysql.com/doc/refman/5.6/en/keywords.html
使用MySQL保留的单词作为列名。
将名称更改为``后,以上操作无效,但第9行出现错误。 检查DOUBLE的定义
https://dev.mysql.com/doc/refman/5.5/en/floating-point-types.html
答案 1 :(得分:0)
尝试以下方法-您无需为int类型指定数据长度
CREATE TABLE `destinations` (
`id` int NOT NULL,
`name` varchar(225) NOT NULL,
`description` text NOT NULL,
`code` int NOT NULL,
`menu_code` int NOT NULL,
`menu_position` int,
`status` tinyint(3) NOT NULL,
`price` DOUBLE NOT NULL);