5 months ago

LARAVEL 5.4 - Check variable exist or not

Posted 5 months ago by vandyczech

Isset check function is not working on Laravel 5.4. How check the variable exist on the same page? I want to show only something when the variable is exist or is set...

In controller

return redirect()->route('document.add')->with('data', $data);

In blade

@if( !empty($data) )

{{ $data }}

Please sign in or create an account to participate in this conversation.