samedi 28 mars 2020

i need code to download pdf (mediumblob) from database (phpmyadmin) in laravel

1.web.php:

Route::get('/', function () { $users = DB::table('products')->select('id_products','name_products','image_products' )->get(); return view('metrial', compact('users')); }); Route::get('metrial','AuthController@test');

2.metrial.blade.php:

<div class="container">
  <div class="row">
  @foreach ($users as $user)

<div class="col-4">
<div class="card" style="width: 18rem;margin:10px; box-shadow:5px 5px 5px 5px #7ed6df;">
<img src="data:image/png;base64," class="card-img-top" > 
  <div class="card-body">
  <h5 class="card-title"></h5>
    <h6 class="card-subtitle mb-2 text-muted"></h6>
    <p class="card-text"></p>
     </div>
</div>
    </div>
    @endforeach
  </div>
</div>

** my tabel (products): (id_products :INT , name_products: varchar(255), describ_products: text , image_products :blob, sheet_products :mediumblob )**



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire