18 lines
566 B
PHP
18 lines
566 B
PHP
|
|
<?php
|
|
$pattern = $columnArray['pattern'];
|
|
foreach($listData->toArray() AS $listColumn => $listValue) {
|
|
$listValue = str_replace("/", "*", $listValue);
|
|
$listValue = str_replace(" ", "*", $listValue);
|
|
$pattern = str_replace("{". $listColumn ."}", $listValue, $pattern);
|
|
}
|
|
|
|
$fullPath = "storage/documents/" . $columnArray['path'].$pattern;
|
|
$search = glob($fullPath, GLOB_BRACE);
|
|
if(count($search)>0) {
|
|
|
|
|
|
?>
|
|
|
|
<a href="{{url($search[0])}}" target="_blank"><i class="fa fa-file-pdf"></i><?php // echo $columnArray['html'] ?></a>
|
|
<?php } ?>
|