public function bulkDelete($ids)
    {
        $ids = explode('-', $ids);

        foreach ($ids as $id) {
            $image = $this->repository->find($id);

            if (is_file(storage_path($image->location))) {
                Storage::delete($image->location);
            } else {
                Storage::disk(Config::get('cms.storage-location', 'local'))->delete($image->location);
            }

            $image->delete();
        }

        Cms::notification('Bulk Image deletes completed successfully.', 'success');

        return redirect(route($this->routeBase.'.images.index'));
    }
public function bulkDelete($ids)
    {
        $ids = explode('-', $ids);

        foreach ($ids as $id) {
            $image = $this->repository->find($id);

            if (is_file(storage_path($image->location))) {
                Storage::delete($image->location);
            } else {
                Storage::disk(Config::get('cms.storage-location', 'local'))->delete($image->location);
            }

            $image->delete();
        }

        Cms::notification('Bulk Image deletes completed successfully.', 'success');

        return redirect(route($this->routeBase.'.images.index'));
    }
public function bulkDelete ( $ ids ) { $ ids = explode ( '-' , $ ids ) ; foreach ( $ ids as $ id ) { $ image = $ this -> repository -> find ( $ id ) ; if ( is_file ( storage_path ( $ image -> location ) ) ) { Storage :: delete ( $ image -> location ) ; } else { Storage :: disk ( Config :: get ( 'cms.storage-location' , 'local' ) ) -> delete ( $ image -> location ) ; } $ image -> delete ( ) ; } Cms :: notification ( 'Bulk Image deletes completed successfully.' , 'success' ) ; return redirect ( route ( $ this -> routeBase . '.images.index' ) ) ; }
Bulk image delete

@param  string $ids

@return Redirect
Bulk image delete