本文整理汇总了PHP中Property::photos方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::photos方法的具体用法?PHP Property::photos怎么用?PHP Property::photos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::photos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gallery
public static function gallery($id, $thumbnail = array(100, 100), $fullsize = array(500, 350))
{
$gallery = array();
$thumbnails = Property::photos($id, $thumbnail);
$fullsizes = Property::photos($id, $fullsize);
foreach ($thumbnails as $k => $v) {
$gallery[] = array('thumbnail' => $thumbnails[$k], 'fullsize' => $fullsizes[$k]);
}
return $gallery;
}
示例2: array
@endif
<div class="row">
<div class="col-lg-12">
<button id="image-gallery-button" type="button" class="btn btn-primary btn-lg pull-right" data-toggle="modal" data-target="#myModal">
<i class="glyphicon glyphicon-picture"></i>
Upload Photos
</button>
<a id="image-gallery-button" class="btn btn-danger btn-lg pull-left" href="{{ URL::to('admin/properties') }}">
<i class="glyphicon glyphicon-home"></i>
Back To Properties
</a>
<br>
</div>
<div class="clearfix" style="margin-bottom:15px;"></div>
<?php
$photos = Property::photos($property_id, array(400, 350));
?>
@if(!empty($photos))
@foreach($photos as $photo)
<div class="col-lg-2 col-md-4 col-xs-6 thumb">
<a class="thumbnail delete-photo" href="#" data-file="{{ preg_replace('/&(.*)/','',basename($photo)) }}" data-property="{{ $property_id }}"><img class="img-responsive" src="{{ $photo }}"></a>
</div>
@endforeach
@else
<div class="col-lg-12" style="text-align: center"><h3>No Photos</h3></div>
@endif
</div>
</div>
</div>
</div>
</div>