jeudi 13 octobre 2016

escape error strings in blade laravel

blade:

    @if ($errors->has('email'))
 <span class="help-block"> <strong>
{!! html_entity_decode( $errors->first('email') )!!}</strong> </span> 
@endif

controller:

if($user == null){
                return redirect()->back()
                    ->withInput($request->only('email'))
                    ->withErrors(['email' => "This e-mail is not exist in our database. Please <a href='/register'>register</a>"]);
            }

I expect to see clickable 'register' link in ui but its raw string as you see: enter image description here

I tried also '@' and '}' symbols, none of them work..



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire