コード例 #1
0
ファイル: Gallery.php プロジェクト: alextravin/yupe
 public function addImage(Image $image)
 {
     $im2g = new ImageToGallery();
     $im2g->setAttributes(['image_id' => $image->id, 'gallery_id' => $this->id]);
     return $im2g->save();
 }
コード例 #2
0
ファイル: Gallery.php プロジェクト: RSol/yupe
 public function addImage(Image $image)
 {
     $im2g = new ImageToGallery();
     $im2g->setAttributes(array('image_id' => $image->id, 'galleryId' => $this->id));
     return $im2g->save() ? true : false;
 }