this is my blade showing codes instead of the interface that i wanted to show : https://i.stack.imgur.com/JSMzL.png
这是我的刀刃
<div class="container">
<div class="row">
@foreach($details as $details)
<tbody action="{{!! action('DestinationDetailsController@details') !!}}" method="get">
<img src="{{!! asset('img/admin/' . $details->dest_img) !!}}" alt="Opps..." style="width:70%;">
<h2>{{!! $details->dest_name !!}}</h2>
<p>{{!! $details->dest_desc !!}}</p>
</tbody>
@endforeach
</div>
这是我的控制器的样子
public function details($id = null)
{
$details = DB::table('destinations')->where('dest_id',$id)->first();
return view('destinationdetail')->with('details', $details);
}
我在开发世界中非常新,所以我真的需要从这种简单的错误中学习:)
答案 0 :(得分:2)
{{!! action('DestinationDetailsController@details') !!}}
应该是:
{!! action('DestinationDetailsController@details') !!}
基本上在使用!!你只用一个支架。
但是您应该使用:
{{ action('DestinationDetailsController@details') }}
除非您真的不想转义数据。