Adicionar selecionado ao item do DropDPown Laravel

@foreach ($categories as $category)
    <option value="{{ $category->id }}"{{ $category->id === $post->category_id ? ' selected' : '' }}>{{ $category->name }}</option>
@endforeach
Zany Zebra