Skip to content

Commit 0e4bdbb

Browse files
committed
Attachment example updated
1 parent 2da6031 commit 0e4bdbb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/custom_attachment_mask.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ public function token(){
2525
* @return bool
2626
*/
2727
public function custom_save() {
28-
$path = storage_path('foo');
28+
$path = "foo".DIRECTORY_SEPARATOR."bar".DIRECTORY_SEPARATOR;
2929
$filename = $this->token();
3030

31-
$path = substr($path, -1) == DIRECTORY_SEPARATOR ? $path : $path.DIRECTORY_SEPARATOR;
32-
33-
return \Illuminate\Support\Facades\File::put($path.$filename, $this->getContent()) !== false;
31+
return file_put_contents($path.$filename, $this->getContent()) !== false;
3432
}
3533

3634
}

0 commit comments

Comments
 (0)