I did a redirect in laravel:
return redirect('admin')->with($returnData);
$returnData is a string that contains a bootstrap info div with the result from the controller. Almost everything is working except when the page loads again it shows the html on the page as if it were text, brackets and everything. If I use this:
@if(!empty(Session::get('error'))) {{ Session::get('error')}} @endif
Then it shows is as pure text. If I change it to
<?php if(!empty(Session::get('error'))) { echo Session::get('error'); } ?>
It works fine. Im ok keeping it like this but I would rather utilize Blade / Laravel as its supposed to be used so I was wondering if there is a way to have the @if statement show the rendered html and not the text version?
{{!! [PHP code goes here] !!}}
to execute code. Blade templates give you that freedom to use a much more clean syntax than surrounding it with PHP tags. – Curch