Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
How can i hide dt if dd got empty value

I need to hide dt if dd got empty value. how can i do that?

  <dt class="col-sm-6 text-dark"  >Subject</dt>
   <dd class="col-sm-6">{{$course_dtl->subject_title }}</dd>

Like i want to hide Subject if subject_title has no value.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

As Brombeer said blade templating has if statements and you can surround the whole block with one:

@if (!empty($course_dtl->subject_title))
   <dt class="col-sm-6 text-dark"  >Subject</dt>
   <dd class="col-sm-6">{{$course_dtl->subject_title }}</dd>
@endif
about 4 years ago · Juan Pablo Isaza Report

0

If you want to hide only dt then you can do this also

<dt class="col-sm-6 text-dark" style="display: {{ $course_dtl->subject_title ? 'block' : 'none' }}" >Subject</dt>
<dd class="col-sm-6">{{$course_dtl->subject_title }}</dd>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!