Skip to content

Instantly share code, notes, and snippets.

@mitrallex
Created February 2, 2018 19:35
Show Gist options
  • Save mitrallex/35b79dd920397329903c455c61fea64a to your computer and use it in GitHub Desktop.
Save mitrallex/35b79dd920397329903c455c61fea64a to your computer and use it in GitHub Desktop.
laravel-file-hosting
if (Storage::disk('local')->exists('/public/' . $this->getUserDir() . '/' . $file->type . '/' . $file->name . '.' . $file->extension)) {
if (Storage::disk('local')->delete('/public/' . $this->getUserDir() . '/' . $file->type . '/' . $file->name . '.' . $file->extension)) {
return response()->json($file->delete());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment