/** * @param $id * @return bool */ public function deleteImages($id) { $photos = Photo::whereFlyer_id($id)->get(); foreach ($photos as $image) { if (!File::Delete(public_path('images/home_pics/') . $image->path)) { return false; } } return true; }