我有一個文件在我的config文件夾消息作爲將數據保存到數據庫(Laravel 5.3)
'msg_log' => [
'created' => 'created successfully',
'not_created' => 'not created',
] 我在數據庫表中作爲消息有兩個領域型如果創建或如果沒有創建等領域notcreated應該到哪裏創建是味精應該在控制器
去消息 我這怎麼能保存到我的郵件表從存儲方法public function store(Request $request)
{
$data['email'] = $request->input('email');
$data['password'] = bcrypt($request->input('password'));
$user = User::create($data);
if($user->id) {
// If Created Here
}else{
// Not created
}
請告訴我該怎麼做,如果別人來保存型和味精在消息表 感謝
什麼是你的配置文件名?可能[this](https://laracasts.com/discuss/channels/general-discussion/ho-to-access-config-variables-in-laravel-5?page=1)可以幫助你。 – Tiger
我馬上得到消息,但不知道如何獲得''創建'=>'創建成功','在上面創建存儲在數據庫意味着已成功創建沒有得到創建關鍵字 –
配置文件名是messages.php –