Skip to content

Commit e09b20d

Browse files
authored
Specifying a disk with storeAs
Added a explanation about how to specify a disk to `storeAs` method.
1 parent 609327a commit e09b20d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

filesystem.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,14 @@ By default, this method will use your default disk. If you would like to specify
340340
$path = $request->file('avatar')->store(
341341
'avatars/'.$request->user()->id, 's3'
342342
);
343+
344+
If you are using the `storeAs` method, pass the disk name in a third argument of options array:
345+
346+
$path = $request->file('avatar')->storeAs(
347+
'avatars',
348+
$request->user()->id,
349+
['disk' => 's3']
350+
);
343351

344352
#### Other File Information
345353

0 commit comments

Comments
 (0)