1

this is my blade showing codes instead of the interface that i wanted to show : https://i.stack.imgur.com/JSMzL.png

this is my blade

<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>

this is my controller looks like

public function details($id = null)
{
    $details = DB::table('destinations')->where('dest_id',$id)->first();
    return view('destinationdetail')->with('details', $details);
}

im very new in development world so i really need to learn from this kind of simple mistakes :)

ween
  • 23
  • 5
  • @miken32 The referenced question has nothing to do with this problem. – Xatenev Nov 30 '18 at 22:22
  • @ween Have you enabled error reporting? If not you should do it, I don't see anything that could cause this behavior. Maybe theres an error occuring at some point before that prevents laravel from parsing your template. https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display aswell https://laravel.com/docs/5.7/errors – Xatenev Nov 30 '18 at 22:24
  • i forgot to put .blade and now it display my output well :) thanks for helping me – ween Nov 30 '18 at 23:33

1 Answers1

2
{{!! action('DestinationDetailsController@details') !!}}

Should be:

{!! action('DestinationDetailsController@details') !!}

Basically when using !! you only use one bracket.

You should however use:

{{ action('DestinationDetailsController@details') }}

unless you really don't want to escape the data.

Mike
  • 375
  • 1
  • 14
  • well actually i tried {{ action('DestinationDetailsController@details') }} this before, yet it wasn''t work out well. the codes still displayed. – ween Nov 30 '18 at 22:09
  • Make sure your filename is filename.blade.php – Mike Nov 30 '18 at 22:32
  • already found my problem and it was because i forgot .blade . thanks for helping :) – ween Nov 30 '18 at 23:34