从数据库发送图像

时间:2019-07-28 15:59:53

标签: laravel bots

我尝试使用foreach从数据库向用户发送图像。 。但它没有发送图片

public function konfirmasiCari()
{
    $pesan = $this->bot->userStorage()->find();
    $response = json_decode($pesan);


    $find = DB::table('keramiks')->select('nama', 'harga', 'image')
        ->where('jenis', $response->jenis)
        ->where('ukuran', $response->ukuran)
        ->where('warna', $response->warna)
        ->where(function ($query){
            $query->where('stok','>=',1);
        })->first();

    $pesanan2 = $pesan->get('jenis');
    $this->say('Kamu memilih ' . $pesanan2);
    foreach ((array) $find as $objek){
        $this->say('ini bukan ' . $objek);
        $this->say('ini bukan ' . $objek);
        $this->say('<img src="/images/'. $objek .'" alt="image"/>');
    }
    $this->askLanjut();
}

输出不是图像

0 个答案:

没有答案
相关问题