Refactore and fix for icon management

This commit is contained in:
Bubka
2020-01-08 23:22:51 +01:00
parent 01534beaf2
commit da6d64f9ee
7 changed files with 94 additions and 51 deletions

View File

@ -108,7 +108,7 @@ class TwoFAccountController extends Controller
public function destroy(TwoFAccount $twofaccount)
{
// delete icon
$storedIcon = 'public/' . pathinfo($twofaccount->icon)['basename'];
$storedIcon = 'public/icons/' . $twofaccount->icon;
if( Storage::exists($storedIcon) ) {
Storage::delete($storedIcon);