dqqvravff05370501 2018-12-06 13:10
浏览 15

在lalavel推荐图像来json解码,如何准确到达仪表板是什么?

I have a laravel project here. In this page there are testimonial section images coming with this kind of name: OYGRUx8slmKeS2VX7tLc.jpg. I've put that image name like test but it is coming in decoded form. The code I have for that is:

@foreach (json_decode($cs->images, true) as $image)
    <li class="wd-casestudy">
        <img onClick="changeImage(this)" src="{{ productImage($image) }}" style="width:100%;cursor: pointer" alt="Partner">
    </li>
@endforeach 

I don't want my images come in decoded format, I want it in its original format.

Please help me, this is my first project in laravel.

this is whole code

@extends(getCurrentTemplate() . '.layouts.app')

@section('content')
@if($casestudies)
<div class="row pageSubheader">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                    {{$data->title}}
                </h1>
            </div>
        </div>
    </div>

</div>
<div class="container" style="margin-top: 50px;">

</div>
<div class="container">
<div class="row">

     <div class="col-md-8">
        <div class="panel panel-default" style="border: unset;">
            <div class="panel-body">
                <div class="static-page">
                    <div class="row">
                        @if($is_single)
                        @foreach($casestudies as $cs)

                            <div class="col-md-12 washroom2">
                                <p>{!!$cs->body!!}</p>
                                <div class="testimonials">
                            @if ($cs->images)
                                <ul class="slider-for-casestudy">


                                @foreach (json_decode($cs->images, true) as $image)

                                    <li class="wd-casestudy">

                                            <img onClick="changeImage(this)" src="{{ productImage($image) }}" style="width:100%;cursor: pointer" alt="Partner">

                                </li>



                                @endforeach
                                    </ul>

                            @endif
                                    </div>
                            </div>
                        @endforeach
                        @else
                        @foreach($casestudies as $cs)
                            <div class="col-md-4 washroom2">

                            @if ($cs->images)

                                @foreach (json_decode($cs->images, true) as $image)
                                    <a href="case-studies/{{$cs->slug}}">
                                    <div class="image-holder">
                                        <img onClick="changeImage(this)" src="{{ productImage(getThumbImg($image)) }}" style="width:100%;cursor: pointer" alt="Partner">
                                        <h6>{{$cs->title}}</h6>
                                    </div>
                                </a>
                                @break
                                @endforeach
                            @endif
                            </div>
                        @endforeach
                        @endif

                    </div>
                    </div>
            </div>
        </div>
    </div>
    <div class="col-md-4">

            @include('default.layouts.inc.sidebar')

    </div>

</div>
</div>
@else
    <p>Content Coming Soon!</p> 
@endif
@stop
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
    • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
    • ¥15 MATLAB中streamslice问题
    • ¥15 如何在炒股软件中,爬到我想看的日k线
    • ¥15 seatunnel 怎么配置Elasticsearch
    • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
    • ¥15 (标签-MATLAB|关键词-多址)
    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端
    • ¥15 基于PLC的三轴机械手程序