示例#1
0
 public function getSoil()
 {
     $fullObjects = \App\Models\Soil::all();
     $responseImages = [];
     foreach ($fullObjects as $obj) {
         $responseImages[$obj->id] = ['top_image' => $obj->top_image];
     }
     return response(json_encode($responseImages, JSON_FORCE_OBJECT), 200, ['Content-Type' => 'application/json']);
 }
示例#2
0
                </div>
            </div>
        </div>
        <div id="garden-zoom" class="btn-group">
            <button type="button" data-zoom="in" class="btn btn-default btn-lg">
                <i class="glyphicon glyphicon-zoom-in"></i>
            </button>
            <button type="button" data-zoom="out" class="btn btn-default btn-lg">
                <i class="glyphicon glyphicon-zoom-out"></i>

            </button>
        </div>
        <svg>
            <defs>
            <?php 
$soilTypes = \App\Models\Soil::all();
/** @var \App\Models\Soil $soil */
foreach ($soilTypes as $soil) {
    ?>
                <pattern id="materialPattern<?php 
    echo $soil->id;
    ?>
" x="0" y="0" patternUnits="userSpaceOnUse" height="<?php 
    echo $soil->top_image->height;
    ?>
" width="<?php 
    echo $soil->top_image->width;
    ?>
">
                    <image x="0" y="0" width="<?php 
    echo $soil->top_image->width;