0
Is there any way to make some try/catch
in a view
of Laravel 4
?
How could I implement in the syntax of blade
?
I’d like something like:
@try
<div class="laravel test">
{{ $usuario->nome }}
</div>
@catch(Exception $e)
{{ $e->getMessage() }}
@endtry
They told me that at SOEN. But, as I also said there, I say here: I know it’s wrong, but I would like to know this because of the curiosity to know how to do it in the compiler of Blade
– Wallace Maxters
Got it. You can write the normal php there. Blade doesn’t have @Try, but if you play php there it will work normally.
– Renan Leme
Buddy, actually I wanted something I can do with Blade Extension
– Wallace Maxters