php - How to use "laravelcollective/html" with blade -


i'm trying pull data folder user can download i'm trying this

{!! html::link('public/{{$file->name}}', '{{$file->name}}') !!} 

but throws out

 <?php echo e($file->name); ?>  <?php echo e($file->name); ?> 

is possible combine 2 , how can done

controller part

public function download($file_name){     $file_path = public_path('/'.$file_name);     return response()->download($file_path); } 

it calls error

notfoundhttpexception in routecollection.php line 161: in routecollection.php line 161 @ routecollection->match(object(request)) in router.php line 821 @ router->findroute(object(request)) in router.php line 691 

user need able download different kind of files img/pdf/doc/xls.

you don't nest blade within blade. once.

{!! html::link('public/'.$file->name, $file->name) !!} 

blade handle parsing there.


Comments