dimanche 24 avril 2016

How to bind response data to view in laravel 5

I was trying display an image at element but it is not working, And when i'm simply returning the data its displaying image.

route.php

Route::get('/dashboard',function() {

       $Image = Auth::user()->profile_pic;
       $type = 'image/jpeg';
       $img = response($Image)->header('Content-Type', $type);

       return View::make('dashboard', ['img'=>$img]);
     });

dashboard.blade.php

<img src= class="img-circle" width="200" height="200">

Please help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire