Tworzenie i aktualizacja Laravel Eloquent
Jaki jest skrót wstawiania nowego rekordu lub aktualizacji, jeśli nie istnieje?
<?php
$shopOwner = ShopMeta::where('shopId', '=', $theID)
->where('metadataKey', '=', 2001)->first();
if ($shopOwner == null) {
// Insert new record into database
} else {
// Update the existing record
}