// Edit Page Blade
<div class="card card-flush py-4">
<!--begin::Card header-->
<div class="card-header">
<!--begin::Card title-->
<div class="card-title">
<h2>Üst Kategori</h2>
</div>
<!--end::Card title-->
</div>
<!--end::Card header-->
<!--begin::Card body-->
<div class="card-body pt-0">
<!--begin::Select store template-->
<label for="parent_id" class="form-label">Üst Kategori</label>
<!--end::Select store template-->
<!--begin::Select2-->
<select class="form-select" data-control="select2" data-placeholder="Üst Kategori" name="parent_id" id="parent_id" data-hide-search="true">
<option></option>
@foreach($categories as $pCategory)
<option value="{{ $pCategory->id }}" {{ isset($category) && $pCategory->id === $category->parent_id ? 'selected' : '' }}>{{ $pCategory->name }}</option>
@endforeach
</select>
<!--end::Select2-->
</div>
<!--end::Card body-->
</div>