SettingController.phpLaravel:數組字符串轉換
public function SendPicture(Request $request) {
$title = "Picture Purchase";
$domain = $_SERVER['SERVER_NAME'];
$email = DB::table('users') - > where('domain', $domain) - > get();
$content = "$email purchase your picture : ";
foreach($request - > input('pic') as $key => $value) {
$content. = "$value".".jpg ";
}
}
ErrorException在SettingController.php行373:數組字符串轉換
line 373: $content = "$email purchase your picture : ";
有'$ email'可能是收藏集,所以你不能像上面那樣轉換成字符串 –
在你SendPicture函數dd($ email)之後請顯示那個輸出 –
試試$ email = DB :: table('users ') - > where('domain',$ domain) - > value('email'); –