mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Rule::requiredIf(!$this->libraryItem->id)
This commit is contained in:
@@ -67,8 +67,10 @@ class NewsArticleForm extends Component
|
||||
$this->validate();
|
||||
$this->libraryItem->save();
|
||||
|
||||
$this->libraryItem->addMedia($this->image)
|
||||
->toMediaCollection('main');
|
||||
if ($this->image) {
|
||||
$this->libraryItem->addMedia($this->image)
|
||||
->toMediaCollection('main');
|
||||
}
|
||||
|
||||
return to_route('article.overview', ['country' => null]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user