79139901

Date: 2024-10-30 06:47:41
Score: 1
Natty:
Report link

In your JobController, you're retrieving all tags with Tag::all(), but it looks like you're not actually passing the $tags variable to your Blade template when rendering it.

@props(['size' => 'base', 'tags'])

@foreach ($tags as $tag)
<a href="/tags/{{ strtolower($tag->name) }}" class="{{ $classes }}">{{ $tag->name }}</a>
@endforeach
  1. Added tags as a prop in your Blade template.
  2. Used a @foreach loop to iterate over each $tag and generate the links.
  3. Verify that your Tag model is correctly set up and that it has a name attribute
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @foreach
  • Low reputation (1):
Posted by: Fawwash Khan