Mails
This commit is contained in:
parent
68b9d1ff88
commit
b9c26d06d0
75 changed files with 2143 additions and 818 deletions
|
|
@ -100,6 +100,16 @@ class FileRepository extends BaseRepository {
|
|||
], 200);
|
||||
}
|
||||
|
||||
public function delete(){
|
||||
if($this->model){
|
||||
if(Storage::disk($this->disk)->exists( $this->model->dir.$this->model->filename )){
|
||||
Storage::disk($this->disk)->delete($this->model->dir.$this->model->filename);
|
||||
}
|
||||
$this->model->delete();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private function makeFilename(){
|
||||
$originalNameWithoutExt = substr($this->originalName, 0, strlen($this->originalName) - strlen($this->extension) - 1);
|
||||
$this->filename = Util::sanitize($originalNameWithoutExt, true, false, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue