@extends('layouts.app') @section('contentSection') Enter Location @foreach (App\Models\Attribute::whereType('location')->orderBy('name')->get() as $attr) has('location') && request()->input('location') == $attr->name ? 'selected' : '' }}> {{ $attr->name }} @endforeach Search Home {{ $slug->title }} {{ $slug->title }} @foreach ($slug->posts as $post) {{ $post->category ? $post->category->title : '' }} {{ $post->title }} @endforeach @endsection
{{ $post->category ? $post->category->title : '' }}