Пример #1
0
 public function getSerialList()
 {
     if ($this->serialList == null) {
         $this->serialList = Serials::query()->where('tvSerial_id = :id:', ['id' => $this->id])->orderBy('serial_num')->execute();
     }
     return $this->serialList;
 }
Пример #2
0
 public function deleteSerial()
 {
     $serial = Serials::query()->where('movie_id = :id:', ['id' => $this->id])->execute()->getFirst();
     if ($serial) {
         $serial->delete();
     }
     return $this;
 }