コード例 #1
0
 public function delete($id)
 {
     return Property::destroy($id);
     // $delSuccess =  Property::destroy($id);
     // if ($delSuccess) {
     //     $images[] = Image::where('propertyId', $id)->get();
     //     //unlink the image.
     //     foreach ($images as $key => $filename) {
     //         $imagePath = base_path() .'/public/uploads/' . $filename[0]->filename;
     //         if (file_exists($imagePath)) {
     //             unlink($imagePath);
     //         }
     //     }
     // }
 }
コード例 #2
0
 public static function delete($id)
 {
     Property::destroy($id);
 }