I need to check if any or all of several database table fields are empty and if any of them are return a class in HTML (or Blade).
At the moment I do this:
<body class="app @if (Auth::user()->site_title == '' | Auth::user()->full_name == '' | Auth::user()->country == '' | Auth::user()->city == '') newuser @endif">
If the fields are empty it prompts a modal for the user to complete them.
Everything works great but I'm hoping for a cleaner way to do this as I need to use the same @if statement again to hide/show a modal accordingly at the bottom of the page.
Maybe return something from the User Model?