@extends('layouts.admin') @section('title', $article->exists ? 'Edit article' : ($source ? 'Translate article' : 'New article')) @section('content') @php $v = fn ($k, $d = null) => old($k, $article->{$k} ?? $source?->{$k} ?? $d); $cropIds = collect(old('crop_ids', $article->exists ? $article->crops->pluck('id') : ($source?->crops->pluck('id') ?? [])))->map(fn ($i) => (int) $i); $topicIds = collect(old('topic_ids', $article->exists ? $article->categories->pluck('id') : ($source?->categories->pluck('id') ?? [])))->map(fn ($i) => (int) $i); @endphp @if ($article->exists)