Skip to content

Commit

Permalink
Attachment example updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Jul 9, 2019
1 parent 2da6031 commit 0e4bdbb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/custom_attachment_mask.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ public function token(){
* @return bool
*/
public function custom_save() {
$path = storage_path('foo');
$path = "foo".DIRECTORY_SEPARATOR."bar".DIRECTORY_SEPARATOR;
$filename = $this->token();

$path = substr($path, -1) == DIRECTORY_SEPARATOR ? $path : $path.DIRECTORY_SEPARATOR;

return \Illuminate\Support\Facades\File::put($path.$filename, $this->getContent()) !== false;
return file_put_contents($path.$filename, $this->getContent()) !== false;
}

}
Expand Down

0 comments on commit 0e4bdbb

Please sign in to comment.