first(); $oliver = Cat::where('nama_kucing', 'Oliver')->first(); if ($milo) { Treatment::create([ 'cat_id' => $milo->id, 'tanggal' => now()->subDays(2), 'keluhan' => 'Bersin terus menerus', 'nama_obat' => 'Flu-Cat Syrup', 'dosis' => '0.5ml / 2x sehari', ]); } if ($oliver) { Treatment::create([ 'cat_id' => $oliver->id, 'tanggal' => now()->subDay(), 'keluhan' => 'Gatal di telinga', 'nama_obat' => 'Salep Scabies', 'dosis' => 'Oles tipis pagi/malam', ]); } } }