Exemplo n.º 1
0
<?php

if (!empty($params[0])) {
    $sliderId = $params[0];
}
if (!empty($sliderId)) {
    $slider = \Sliders\Slider::get($sliderId);
}
if (!empty($alias)) {
    $slider = Sliders\Slider::get($alias, 'alias');
}
$slides = $slider->slides(['order' => ['weight', 'ASC']]);
?>
<div id="sliderWidget-<?php 
echo $slider->id;
?>
" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <?php 
$i = 0;
for ($i = 0; $i < count($slides); $i++) {
    ?>
        <li data-target="#sliderWidget-<?php 
    echo $slider->id;
    ?>
" data-slide-to="<?php 
    echo $i;
    ?>
" <?php 
    echo !$i ? 'class="active"' : '';
Exemplo n.º 2
0
 public function get_images($count)
 {
     return repo::orderBy("id", "desc")->take($count)->get();
 }
Exemplo n.º 3
0
 public function getList()
 {
     $sliders = Slider::all();
     return $this->theme->baseDashboard("Sliders::SliderList", compact('sliders'));
 }