LARAVEL 5.4 - Check variable exist or not

Posted 2 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 }}
            
@endif

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

Reply to

Use Markdown with GitHub-flavored code blocks.